Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Nearest Neighbors » KNN_Classify

KNN_Classify


Classify data using the KNN classifier.

Name Type Range Description
inKNNModel KNNModel Trained KNN model
inFeature RealArray Vector of features
inK Integer 1 - + Numbers of neighbors
inDistanceType Metric Geometry distance type used to calculate neighbors
outClass Integer

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError The inFeature has different dimensions count than KNNModel in KNN_Classify.
DomainError The inK is bigger than data samples count in KNN_Classify.
DomainError Using not trained classifier in KNN_Classify.

Complexity Level

This filter is available on Expert Complexity Level.