Batch Processing

kNN classification follows the general workflow described in Usage Model: Training and Prediction.

Training

For a description of the input and output, refer to Usage Model: Training and Prediction.

At the training stage, K-D tree based kNN classifier has the following parameters:

Parameter

Default Value

Description

algorithmFPType

float

The floating-point type that the algorithm uses for intermediate computations. Can be float or double.

method

defaultDense

The computation method used by the K-D tree based kNN classification. The only training method supported so far is the default dense method.

nClasses

2

The number of classes.

dataUseInModel

doNotUse

A parameter to enable/disable use of the input data set in the kNN model. Possible values:

  • doNotUse - the algorithm does not include the input data and labels in the trained kNN model but creates a copy of the input data set.
  • doUse - the algorithm includes the input data and labels in the trained kNN model.

The algorithm reorders feature vectors and corresponding labels in the input data set or its copy to improve performance at the prediction stage.

If the value is doUse, do not deallocate the memory for input data and labels.

engine

SharePtr< engines:: mt19937:: Batch>()

Pointer to the random number generator engine that is used internally to perform sampling needed to choose dimensions and cut-points for the K-D tree.

Prediction

For a description of the input and output, refer to Usage Model: Training and Prediction.

At the prediction stage, K-D tree based kNN classifier has the following parameters:

Parameter

Default Value

Description

algorithmFPType

float

The floating-point type that the algorithm uses for intermediate computations. Can be float or double.

method

defaultDense

The computation method used by the K-D tree based kNN classification. The only prediction method supported so far is the default dense method.

nClasses

2

The number of classes.

k

1

The number of neighbors.

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)