Developer Guide

Contents

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.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804