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


