F_VN_CreateStaModelExp
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
Inputs
Name |
Type |
Description |
---|---|---|
ipMlModel |
Reference To ITcVnMlModel |
Returns the created model (Non-zero interface pointers are reused.) |
eStaType |
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 indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
Further information
The function F_VN_CreateStaModelExp
is an expert variant of F_VN_CreateStaModel. It contains additional parameters.
Parameter
Model
The created model is returned in the interface pointer ipMlModel
.
Model type
eStaType
specifies whether the STA model is used for classification (TCVN_STA_CLASSIFIER
), regression (TCVN_STA_REGRESSOR
), clustering (TCVN_STA_CLUSTERER
) or anomaly detection (TCVN_STA_NOVELTY_DETECTOR
).
Vigilance parameters
This parameter is crucial for adapting the model to the respective task, as it controls the maximum size of the sub-areas to be learned.
Number of neighbors used
nNu
specifies the number of neighboring sub-areas used for classification and prediction and must be >= 1.
Higher accuracy
If bDoublePrecision
is TRUE
, LREAL
is used as the data type for the internal calculations of the model; if it is FALSE
, REAL
is used.
Application
For example, an STA model for classification can be created like this:
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.54 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |