Back to Adaptive Vision Library website

You are here: Start » Function Reference » Nearest Neighbors » KNN_Init

KNN_Init


Initializes the KNN classifier.

Syntax

C++
C#
 
void avl::KNN_Init
(
	const int inClassCount,
	const int inDimensionCount,
	avl::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

Error type Description
DomainError At least two classes must be provided.
DomainError Feature vector should have at least one dimension.