CreateBoostClassifier

Create a Boost classifier. The initial reference count is set to one if a new model is created and kept, otherwise. The Boost classifier is only applicable to binary classification problems. It learns to distinguish between samples labelled with two user-defined class labels by incrementally adding weak classifiers to improve the classification results. Models of this type neither support on-line training (sample by sample) nor retraining.

Syntax

Definition:

HRESULT CreateBoostClassifier(
    HRESULT                  hrPrev,
    ITcVnMlModel*&           ipMlModel,
    ETcVnBoostClassifierType eType = BCT_REAL,
    ULONG                    nMaxDepth = 1,
    ULONG                    nMinSamples = 10,
    ULONG                    nWeakClassifiers = 100,
    double                   fWeightTrimRate = 0.95,
    ITcVnContainer*          ipClassPriors = nullptr
)

Parameters

Name

Type

Default

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.)

eType

ETcVnBoostClassifierType

BCT_REAL

Learning algorithm type (default: TCVN_BCT_REAL)

nMaxDepth

ULONG

1

Maximum tree depth (default: 1)

nMinSamples

ULONG

10

Minimum number of samples within a node required for splitting (default: 10)

nWeakClassifiers

ULONG

100

Number of weak classifiers (default: 100)

fWeightTrimRate

double

0.95

Weight threshold used during training (off: 0; default: 0.95).

ipClassPriors

ITcVnContainer*

nullptr

Class priors (ContainerType_Vector_REAL or ContainerType_Vector_LREAL; only for classifiers; optional, set to 0 if not required or not allowed; default: 0)

CreateBoostClassifier 1: Return value

HRESULT

Required License

TC3 Vision Machine Learning

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4024.54 or later

PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU

Tc3_Vision