F_VN_CreateNbcModel

F_VN_CreateNbcModel 1:

Create a normal Bayes classifier of the specified type. The initial reference count is set to one if a new model is created and kept, otherwise. In order to train normal Bayes classifiers, a sufficiently high number of samples is required for each class. It depends on the number of features and the distribution of the data. Hence, it needs to be tested for each application. Models of this type do not support on-line training (sample by sample). For the retraining of such classifier models, the set of presented classes must be identical to the previous learning steps. Otherwise, an exception is raised.

Syntax

Definition:

FUNCTION F_VN_CreateNbcModel : HRESULT
VAR_INPUT
    ipMlModel : Reference To ITcVnMlModel;
    eNbcType  : ETcVnNbc;
    hrPrev    : HRESULT;
END_VAR

F_VN_CreateNbcModel 2: Inputs

Name

Type

Description

ipMlModel

Reference To ITcVnMlModel

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

eNbcType

ETcVnNbc

Normal Bayes classifier type

hrPrev

HRESULT

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

F_VN_CreateNbcModel 3: Return value

HRESULT

Weiterführende Informationen

Die Funktion F_VN_CreateNbcModel erstellt ein Normal Bayes Classifier (NBC) Modell.

Normal Bayes Classifier-Modelle

Beim Normal Bayes Classifier wird ein Mischverteilungsmodell erstellt, bei dem jede Klasse durch eine Gaußverteilung repräsentiert wird. Während des Trainings werden die Parameter dieser Gaußfunktionen ermittelt.

Parameter

Modell

In dem Interface Pointer ipMlModel wird das erstellte Modell zurückgegeben.

Modell-Typ

eNbcType legt fest, ob NBC zur Klassifizierung (TCVN_NBC_CLASSIFIER) oder zur Anomalie-Detektion (TCVN_NBC_NOVELTY_DETECTOR) genutzt wird.

Anwendung

Ein NBC-Modell zur Klassifizierung kann z.B. so erstellt werden:

hr := F_VN_CreateNbcModel(
    ipMlModel   := ipMlModel,
    eNbcType    := TCVN_NBC_CLASSIFIER,
    hrPrev      := hr);

Required License

TC3 Vision Machine Learning

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1. 4024.44 or later

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

Tc3_Vision