Back to FabImage Library website
You are here: Start » Function Reference » Data Classification » Nearest Neighbors » KNN_Init

KNN_Init
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
Initializes the KNN classifier.
Syntax
C++
C#
void fil::KNN_Init ( const int inClassCount, const int inDimensionCount, fil::KNNModel& outKNNModel )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inClassCount | const int | 2 - +![]() |
Number of classes | |
![]() |
inDimensionCount | const int | 1 - +![]() |
Length of feature vector | |
![]() |
outKNNModel | KNNModel& | Initialized KNN model |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | At least two classes must be provided. |
DomainError | Feature vector should have at least one dimension. |