F_VN_CreateStaModelExp

F_VN_CreateStaModelExp 1:

Create a Simplified TopoART neural network 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), retraining, as well as scalar and vectorial predictions. It requires all input except class labels (i.e., samples and training outputs/predictions) to lie in the interval [0.0, 1.0]. The predictions of regressors need to be rescaled from the interval [0.0, 1.0] to their respective value range before usage. Depending on the parameter settings and the number of available training samples, repeated training with the same data may improve the results. Like other neural networks based on the Adaptive Resonance Theory (ART), Simplified TopoART neural networks are not prone to catastrophic inference and patricularly well-suited to incremental learning tasks. (expert function)

Syntax

Definition:

FUNCTION F_VN_CreateStaModelExp : HRESULT
VAR_INPUT
    ipMlModel        : Reference To ITcVnMlModel;
    eStaType         : ETcVnSta;
    fRho             : LREAL;
    nNu              : UDINT;
    bDoublePrecision : BOOL;
    hrPrev           : HRESULT;
END_VAR

F_VN_CreateStaModelExp 2: Inputs

Name

Type

Description

ipMlModel

Reference To ITcVnMlModel

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

eStaType

ETcVnSta

Simpified TopoART model type

fRho

LREAL

Vigilance parameter (controls the number of neurons that are inserted and the maximum size of the formed categories; valid range: [0.0, 1.0]; suggested range: [0.8, 1.0))

nNu

UDINT

Number of neurons used for classification and prediction (must be larger than or equal to 1; suggested range: [1, 10); default: 3)

bDoublePrecision

BOOL

If true, the model is generated with double precision (LREAL) instead of single precision (REAL). (default: FALSE)

hrPrev

HRESULT

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

F_VN_CreateStaModelExp 3: Return value

HRESULT

Weiterführende Informationen

Die Funktion F_VN_CreateStaModelExp ist eine Expert-Variante von F_VN_CreateStaModel. Sie enthält zusätzliche Parameter.

Parameter

Modell

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

Modell-Typ

eStaType legt fest, ob das STA-Modell zur Klassifizierung (TCVN_STA_CLASSIFIER), zur Regression (TCVN_STA_REGRESSOR), zum Clustering (TCVN_STA_CLUSTERER) oder zur Anomalie-Detektion (TCVN_STA_NOVELTY_DETECTOR) genutzt wird.

Vigilanz-Parameter

Zur Anpassung des Modells an die jeweilige Aufgabenstellung ist dieser Parameter entscheidend, da er die maximale Größe der zu lernenden Teilbereiche steuert.

Anzahl genutzter Nachbarn

nNu gibt die Anzahl der für die Klassifizierung und Vorhersage verwendeten Nachbarteilbereiche an und muss >= 1 sein.

Höhere Genauigkeit

Wenn bDoublePrecision TRUE ist, wird LREAL als Datentyp für die internen Berechnungen des Modells genutzt; wenn es FALSE ist, wird REAL genutzt.

Anwendung

Ein STA-Modell zur Klassifikation kann z.B. so erstellt werden:

hr := F_VN_CreateStaModel(
    ipMlModel        := ipMlModel,
    eStaType         := TCVN_STA_CLASSIFIER,
    fRho             := 0.9,
    nNu              := 3,
    bDoublePrecision := FALSE,
    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