Provides actions for the k-nearest neighbor algorithm
Performs k-nearest neighbor search.
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
required parameterquery |
— |
specifies the query input data table, which contains the query observations. |
|
required parametertable |
— |
specifies the settings for an input table. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the output data table in which to save the computed distances. |
|
|
— |
specifies the output data table in which to save the query data after imputing missing values. |
|
|
required parametercasOut |
specifies the output data table in which to save the computed neighbors. |
|
|
names |
lists the names of results tables to save as CAS tables on the server. |
specifies the variable attributes.
For more information about specifying the attributes parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | attribute |
|---|
specifies a list of results tables to send to the client for display.
For more information about specifying the display parameter, see the common displayTables parameter (Appendix A: Common Parameters).
specifies the metric to be used to measure the distance between points in k-nearest neighbor calculations.
| Alias | distMetric |
|---|---|
| Default | L2 |
specifies the number of neighbors to consider during graph construction.
| Alias | ef |
|---|---|
| Default | 200 |
| Minimum value | 1 |
specifies the number of candidate nodes to explore during the graph search phase.
| Default | 10 |
|---|---|
| Minimum value | 1 |
specifies the variable to use as the record identifier.
when set to True, specifies that observations with missing values in the query data table be imputed by using the k-nearest-neighbors method.
| Default | FALSE |
|---|
specifies the variables to use in the analysis.
For more information about specifying the inputs parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | input |
|---|
specifies the number of neighbors to be returned.
| Default | 2 |
|---|
specifies the maximum number of connections that each node can have to other nodes within a layer.
| Alias | M |
|---|---|
| Default | 16 |
| Range | 2–10000 |
specifies the output data table in which to save the computed distances.
For more information about specifying the outDist parameter, see the common casouttable (Form 1) parameter (Appendix A: Common Parameters).
specifies the output data table in which to save the query data after imputing missing values.
For more information about specifying the outImpute parameter, see the common casouttable (Form 2) parameter (Appendix A: Common Parameters).
specifies the output data table in which to save the computed neighbors.
For more information about specifying the output parameter, see the common outputStatement parameter (Appendix A: Common Parameters).
lists the names of results tables to save as CAS tables on the server.
For more information about specifying the outputTables parameter, see the common outputTables parameter (Appendix A: Common Parameters).
specifies the query input data table, which contains the query observations.
| Long form | query={name="table-name"} |
|---|---|
| Shortcut form | query="table-name" |
The castable value can be one or more of the following:
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | FALSE |
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the input table.
when set to True, does not create a transient table on the server. Setting this parameter to True can be efficient, but the data might not have stable ordering upon repeated runs.
| Default | FALSE |
|---|
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the input data.
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
specifies the caslib for the filter table. By default, the active caslib is used.
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the filter table.
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the data from the filter table.
specifies the seed value for random number generation.
| Default | 0 |
|---|
specifies the settings for an input table.
| Long form | table={name="table-name"} |
|---|---|
| Shortcut form | table="table-name" |
The castable value can be one or more of the following:
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | FALSE |
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the input table.
when set to True, does not create a transient table on the server. Setting this parameter to True can be efficient, but the data might not have stable ordering upon repeated runs.
| Default | FALSE |
|---|
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the input data.
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
specifies the caslib for the filter table. By default, the active caslib is used.
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the filter table.
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the data from the filter table.
specifies the threshold value to use for distance computation.
| Default | 100 |
|---|
when set to True, specifies that only the top k nearest distances be output to the outDist parameter table.
| Default | FALSE |
|---|
Performs k-nearest neighbor search.
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
required parameterquery |
— |
specifies the query input data table, which contains the query observations. |
|
required parametertable |
— |
specifies the settings for an input table. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the output data table in which to save the computed distances. |
|
|
— |
specifies the output data table in which to save the query data after imputing missing values. |
|
|
required parametercasOut |
specifies the output data table in which to save the computed neighbors. |
|
|
names |
lists the names of results tables to save as CAS tables on the server. |
specifies the variable attributes.
For more information about specifying the attributes parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | attribute |
|---|
specifies a list of results tables to send to the client for display.
For more information about specifying the display parameter, see the common displayTables parameter (Appendix A: Common Parameters).
specifies the metric to be used to measure the distance between points in k-nearest neighbor calculations.
| Alias | distMetric |
|---|---|
| Default | L2 |
specifies the number of neighbors to consider during graph construction.
| Alias | ef |
|---|---|
| Default | 200 |
| Minimum value | 1 |
specifies the number of candidate nodes to explore during the graph search phase.
| Default | 10 |
|---|---|
| Minimum value | 1 |
specifies the variable to use as the record identifier.
when set to True, specifies that observations with missing values in the query data table be imputed by using the k-nearest-neighbors method.
| Default | false |
|---|
specifies the variables to use in the analysis.
For more information about specifying the inputs parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | input |
|---|
specifies the number of neighbors to be returned.
| Default | 2 |
|---|
specifies the maximum number of connections that each node can have to other nodes within a layer.
| Alias | M |
|---|---|
| Default | 16 |
| Range | 2–10000 |
specifies the output data table in which to save the computed distances.
For more information about specifying the outDist parameter, see the common casouttable (Form 1) parameter (Appendix A: Common Parameters).
specifies the output data table in which to save the query data after imputing missing values.
For more information about specifying the outImpute parameter, see the common casouttable (Form 2) parameter (Appendix A: Common Parameters).
specifies the output data table in which to save the computed neighbors.
For more information about specifying the output parameter, see the common outputStatement parameter (Appendix A: Common Parameters).
lists the names of results tables to save as CAS tables on the server.
For more information about specifying the outputTables parameter, see the common outputTables parameter (Appendix A: Common Parameters).
specifies the query input data table, which contains the query observations.
| Long form | query={name="table-name"} |
|---|---|
| Shortcut form | query="table-name" |
The castable value can be one or more of the following:
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | false |
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the input table.
when set to True, does not create a transient table on the server. Setting this parameter to True can be efficient, but the data might not have stable ordering upon repeated runs.
| Default | false |
|---|
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the input data.
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
specifies the caslib for the filter table. By default, the active caslib is used.
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the filter table.
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the data from the filter table.
specifies the seed value for random number generation.
| Default | 0 |
|---|
specifies the settings for an input table.
| Long form | table={name="table-name"} |
|---|---|
| Shortcut form | table="table-name" |
The castable value can be one or more of the following:
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | false |
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the input table.
when set to True, does not create a transient table on the server. Setting this parameter to True can be efficient, but the data might not have stable ordering upon repeated runs.
| Default | false |
|---|
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the input data.
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
specifies the caslib for the filter table. By default, the active caslib is used.
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the filter table.
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the data from the filter table.
specifies the threshold value to use for distance computation.
| Default | 100 |
|---|
when set to True, specifies that only the top k nearest distances be output to the outDist parameter table.
| Default | false |
|---|
Performs k-nearest neighbor search.
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
required parameterquery |
— |
specifies the query input data table, which contains the query observations. |
|
required parametertable |
— |
specifies the settings for an input table. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the output data table in which to save the computed distances. |
|
|
— |
specifies the output data table in which to save the query data after imputing missing values. |
|
|
required parametercasOut |
specifies the output data table in which to save the computed neighbors. |
|
|
names |
lists the names of results tables to save as CAS tables on the server. |
specifies the variable attributes.
For more information about specifying the attributes parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | attribute |
|---|
specifies a list of results tables to send to the client for display.
For more information about specifying the display parameter, see the common displayTables parameter (Appendix A: Common Parameters).
specifies the metric to be used to measure the distance between points in k-nearest neighbor calculations.
| Alias | distMetric |
|---|---|
| Default | L2 |
specifies the number of neighbors to consider during graph construction.
| Alias | ef |
|---|---|
| Default | 200 |
| Minimum value | 1 |
specifies the number of candidate nodes to explore during the graph search phase.
| Default | 10 |
|---|---|
| Minimum value | 1 |
specifies the variable to use as the record identifier.
when set to True, specifies that observations with missing values in the query data table be imputed by using the k-nearest-neighbors method.
| Default | False |
|---|
specifies the variables to use in the analysis.
For more information about specifying the inputs parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | input |
|---|
specifies the number of neighbors to be returned.
| Default | 2 |
|---|
specifies the maximum number of connections that each node can have to other nodes within a layer.
| Alias | M |
|---|---|
| Default | 16 |
| Range | 2–10000 |
specifies the output data table in which to save the computed distances.
For more information about specifying the outDist parameter, see the common casouttable (Form 1) parameter (Appendix A: Common Parameters).
specifies the output data table in which to save the query data after imputing missing values.
For more information about specifying the outImpute parameter, see the common casouttable (Form 2) parameter (Appendix A: Common Parameters).
specifies the output data table in which to save the computed neighbors.
For more information about specifying the output parameter, see the common outputStatement parameter (Appendix A: Common Parameters).
lists the names of results tables to save as CAS tables on the server.
For more information about specifying the outputTables parameter, see the common outputTables parameter (Appendix A: Common Parameters).
specifies the query input data table, which contains the query observations.
| Long form | query={"name":"table-name"} |
|---|---|
| Shortcut form | query="table-name" |
The castable value can be one or more of the following:
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | False |
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
specifies the settings for reading a table from a data source.
| Alias | import_ |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the input table.
when set to True, does not create a transient table on the server. Setting this parameter to True can be efficient, but the data might not have stable ordering upon repeated runs.
| Default | False |
|---|
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the input data.
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
specifies the caslib for the filter table. By default, the active caslib is used.
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
specifies the settings for reading a table from a data source.
| Alias | import_ |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the filter table.
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the data from the filter table.
specifies the seed value for random number generation.
| Default | 0 |
|---|
specifies the settings for an input table.
| Long form | table={"name":"table-name"} |
|---|---|
| Shortcut form | table="table-name" |
The castable value can be one or more of the following:
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | False |
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
specifies the settings for reading a table from a data source.
| Alias | import_ |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the input table.
when set to True, does not create a transient table on the server. Setting this parameter to True can be efficient, but the data might not have stable ordering upon repeated runs.
| Default | False |
|---|
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the input data.
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
specifies the caslib for the filter table. By default, the active caslib is used.
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
specifies the settings for reading a table from a data source.
| Alias | import_ |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the filter table.
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the data from the filter table.
specifies the threshold value to use for distance computation.
| Default | 100 |
|---|
when set to True, specifies that only the top k nearest distances be output to the outDist parameter table.
| Default | False |
|---|
Performs k-nearest neighbor search.
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
required parameterquery |
— |
specifies the query input data table, which contains the query observations. |
|
required parametertable |
— |
specifies the settings for an input table. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the output data table in which to save the computed distances. |
|
|
— |
specifies the output data table in which to save the query data after imputing missing values. |
|
|
required parametercasOut |
specifies the output data table in which to save the computed neighbors. |
|
|
names |
lists the names of results tables to save as CAS tables on the server. |
specifies the variable attributes.
For more information about specifying the attributes parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | attribute |
|---|
specifies a list of results tables to send to the client for display.
For more information about specifying the display parameter, see the common displayTables parameter (Appendix A: Common Parameters).
specifies the metric to be used to measure the distance between points in k-nearest neighbor calculations.
| Alias | distMetric |
|---|---|
| Default | L2 |
specifies the number of neighbors to consider during graph construction.
| Alias | ef |
|---|---|
| Default | 200 |
| Minimum value | 1 |
specifies the number of candidate nodes to explore during the graph search phase.
| Default | 10 |
|---|---|
| Minimum value | 1 |
specifies the variable to use as the record identifier.
when set to True, specifies that observations with missing values in the query data table be imputed by using the k-nearest-neighbors method.
| Default | FALSE |
|---|
specifies the variables to use in the analysis.
For more information about specifying the inputs parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
| Alias | input |
|---|
specifies the number of neighbors to be returned.
| Default | 2 |
|---|
specifies the maximum number of connections that each node can have to other nodes within a layer.
| Alias | M |
|---|---|
| Default | 16 |
| Range | 2–10000 |
specifies the output data table in which to save the computed distances.
For more information about specifying the outDist parameter, see the common casouttable (Form 1) parameter (Appendix A: Common Parameters).
specifies the output data table in which to save the query data after imputing missing values.
For more information about specifying the outImpute parameter, see the common casouttable (Form 2) parameter (Appendix A: Common Parameters).
specifies the output data table in which to save the computed neighbors.
For more information about specifying the output parameter, see the common outputStatement parameter (Appendix A: Common Parameters).
lists the names of results tables to save as CAS tables on the server.
For more information about specifying the outputTables parameter, see the common outputTables parameter (Appendix A: Common Parameters).
specifies the query input data table, which contains the query observations.
| Long form | query=list(name="table-name") |
|---|---|
| Shortcut form | query="table-name" |
The castable value can be one or more of the following:
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | FALSE |
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the input table.
when set to True, does not create a transient table on the server. Setting this parameter to True can be efficient, but the data might not have stable ordering upon repeated runs.
| Default | FALSE |
|---|
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the input data.
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
specifies the caslib for the filter table. By default, the active caslib is used.
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the filter table.
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the data from the filter table.
specifies the seed value for random number generation.
| Default | 0 |
|---|
specifies the settings for an input table.
| Long form | table=list(name="table-name") |
|---|---|
| Shortcut form | table="table-name" |
The castable value can be one or more of the following:
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | FALSE |
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the input table.
when set to True, does not create a transient table on the server. Setting this parameter to True can be efficient, but the data might not have stable ordering upon repeated runs.
| Default | FALSE |
|---|
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the input data.
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
specifies the caslib for the filter table. By default, the active caslib is used.
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
specifies the name of the filter table.
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
specifies the format to apply to the variable.
specifies the length of the format field plus the length of the format precision.
specifies the descriptive label for the variable.
specifies the name for the variable.
specifies the length of the format precision.
specifies the length of the format field.
specifies an expression for subsetting the data from the filter table.
specifies the threshold value to use for distance computation.
| Default | 100 |
|---|
when set to True, specifies that only the top k nearest distances be output to the outDist parameter table.
| Default | FALSE |
|---|