You are here: Start » FIL.NET » Function Reference » Data Classification » Nearest Neighbors » FIL.KNN_Classify
Classify data using the KNN classifier.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void KNN_Classify ( FilNet.KNNModel inKNNModel, IList<float> inFeature, int inK, FilNet.Metric inDistanceType, out int outClass )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inKNNModel | FilNet.KNNModel | Trained KNN model. | ||
![]() | inFeature | System.Collections.Generic.IList<float> | Vector of features. | ||
![]() | inK | int | <1, +INF> | Numbers of neighbors. | |
![]() | inDistanceType | FilNet.Metric | Geometry distance type used to calculate neighbors. | ||
![]() | outClass | int |
Errors
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. |