TD_​KNN

This function classifies data objects based on proximity to other data objects with known classification.

Options

Accumulate
Specify the names of the input table columns that need to be copied from the input test table to output.
EmitDistances
A boolean flag which specifies whether the neighbor distances are to be emitted in the output.
EmitNeighbors
A boolean flag which specifies whether the neighbors are to be emitted in the output.
IDColumn
Specify the name of the column that uniquely identifies a data object both in training table and test table.
InputColumns
Specify the names of the training table columns that the function uses to compute the distance between a test object and the training objects. The test table must also have these columns.
K
Specify the number of nearest neighbors to use in the algorithm. Any positive integer value > 0 and <= 1000 can be chosen.
ModelType
Specify the Model Type for KNN function. Acceptable values are 'regression', 'classification', or 'neighbors'.
OutputProb
Indicates whether the function should output the probability for each response specified in 'Responses'. If 'Responses' is not given, outputs the probability of the predicted response.
ResponseColumn
Specify the name of the training table column that contains the numeric response variable values to be used for prediction in KNN based regression or classification.
Responses (strings seperated by new line)
Specify the class labels for which to output probabilities.
Output Schema
Output Schema, if Volatile is true then use user login as the schema.
Output Table
Output Table
VAL Location
VAL Location
Volatile
Specifies whether the table should be a VOLATILE table. If true, then the table is automatically deleted, otherwise it is users responsibility to remove or clean it up for space.
Tolerance
When a non-zero voting weight is used, the case of zero distance will cause the weight (w=1/POWER(distance, voting_weight)) to be undefined. Tolerance allows the user to define the smallest distance to be considered. For any distance under the given tolerance, the weight will be calculated as w=1/POWER(tolerance, voting_weight).
VotingWeight
Specifies the voting weight of the training object for determining the class of the test object as a function of the distance between the training and test objects. The voting weight is calculated as w, where w=1/POWER(distance, voting_weight) and distance is the distance between the test object and the training object. Must be a non-negative real number.

Input Ports

Icon
Connection to a Teradata Database Instance
Icon
Specifies the table containing the input data.
Icon
Specifies the table containing the model data.

Output Ports

Icon
output of TD_KNN

Nodes

Extensions

Links