KNN Model Nugget

The KNN model creates a number of new fields, as shown in the following table. To see these fields and their values, add a Table node to the KNN model nugget and execute the Table node, or click the Preview button on the nugget.

Table 1. KNN model fields
New field name Description
$KNN-fieldname Predicted value of target field.
$KNNP-fieldname Probability of predicted value.
$KNNP-value Probability of each possible value of a nominal or flag field. Included only if Append all probabilities is checked on the Settings tab of the model nugget.
$KNN-neighbor-n The name of the nth nearest neighbor to the focal record. Included only if Display Nearest on the Settings tab of the model nugget is set to a non-zero value.
$KNN-distance-n The relative distance from the focal record of the nth nearest neighbor to the focal record. Included only if Display Nearest on the Settings tab of the model nugget is set to a non-zero value.