CreateKnnModel

Create a k-nearest neighbors model of the specified type. The initial reference count is set to one if a new model is created and kept, otherwise. Models of this type support on-line training (sample by sample) and retraining. Predictions can only be scalar.

Syntax

Definition:

HRESULT CreateKnnModel(
    HRESULT        hrPrev,
    ITcVnMlModel*& ipMlModel,
    ETcVnKnn       eKnnType,
    ULONG          nK
)

Parameters

Name

Type

Description

hrPrev

HRESULT

HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.)

ipMlModel

ITcVnMlModel*&

Returns the created model (Non-zero interface pointers are reused.)

eKnnType

ETcVnKnn

k-nearest neighbors model type

nK

ULONG

Parameter k used for prediction (number of considered neighbors)

CreateKnnModel 1: Return value

HRESULT

Required License

TC3 Machine Learning Realtime Inference

System Requirements