KNN_Classify
Classify data using the KNN classifier.
Syntax
C++
C#
Python
def KNN_Classify( inKNNModel: KNNModel, inFeature: list[float], /, *, inK: int = 1, inDistanceType: Metric = Metric.Taxi ) -> outClass: int
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inKNNModel | KNNModel | Trained KNN model | ||
![]() |
inFeature | list[float] | Vector of features | ||
![]() |
inK | int | 1 - +![]() |
1 | Numbers of neighbors |
![]() |
inDistanceType | Metric | Metric.Taxi | Geometry distance type used to calculate neighbors | |
![]() |
outClass | int |



