You are here: Start » AVL.NET » AVL.KNN_Classify(AvlNet.KNNModel, float[], int, AvlNet.Metric, int)
AVL.KNN_Classify(AvlNet.KNNModel, float[], int, AvlNet.Metric, int)
Classify data using the KNN classifier.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void KNN_Classify( AvlNet.KNNModel inKNNModel, float[] inFeature, int inK, AvlNet.Metric inDistanceType, out int outClass )
Parameters
- inKNNModel
- Type: AvlNet.KNNModel
Trained KNN model - inFeature
- Type: System.Single
Vector of features - inK
- Type: System.Int32
Numbers of neighbors - inDistanceType
- Type: AvlNet.Metric
Geometry distance type used to calculate neighbors - outClass
- Type: System.Int32
Errors
| Error type | Description |
|---|---|
| DomainError | Using not trained classifier in KNN_Classify. |
| DomainError | The inFeature has different dimensions count than KNNModel in KNN_Classify. |
| DomainError | The inK is bigger than data samples count in KNN_Classify. |
