Back to Aurora Vision Library website

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

KNN_Init


Header: AVL.h
Namespace: avl
Module: FoundationPro

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
Input value inClassCount const int 2 - + Number of classes
Input value inDimensionCount const int 1 - + Length of feature vector
Output value 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.