Back to FabImage Studio website
You are here: Start » Filter Reference » Nearest Neighbors » KNN_Train
Trains KNN classifier using sample data.
Name | Type | Description | |
---|---|---|---|
![]() |
inKNNModel | KNNModel | Initialized KNN model |
![]() |
inFeatures | RealArrayArray | Array of features array |
![]() |
inClasses | IntegerArray | Array of classes corresponding to feature array elements |
![]() |
outKNNModel | KNNModel | Trained KNN model |
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 | Array inClasses contains negative values in KNN_Train. |
DomainError | Array inClasses contains values grater than maximal class value in KNN_Train. |
DomainError | Input array inClasses is empty in KNN_Train. |
DomainError | Input array inFeatures is empty in KNN_Train. |
DomainError | Input inFeatures contains array of different sizes in KNN_Train. |
DomainError | The inFeatures size is different than inClasses size in KNN_Train. |
DomainError | Using uninitialized classifier in KNN_Train. |
Complexity Level
This filter is available on Expert Complexity Level.