F_VN_TrainSample

F_VN_TrainSample 1:

Train a clusterer or a novelty detector with a single sample.

Syntax

Definition:

FUNCTION F_VN_TrainSample : HRESULT
VAR_INPUT
    ipMlModel : ITcVnMlModel;
    ipSample  : ITcUnknown;
    hrPrev    : HRESULT;
END_VAR

F_VN_TrainSample 2: Inputs

Name

Type

Description

ipMlModel

ITcVnMlModel

Clusterer or novelty detector to be used

ipSample

ITcUnknown

Container holding a single input sample (ContainerType_Vector_REAL or ContainerType_Vector_LREAL)

hrPrev

HRESULT

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

F_VN_TrainSample 3: Return value

HRESULT

Further information

The function F_VN_TrainSample trains a clusterer or novelty detection model with a sample.

Parameter

Model

The previously created model must be transferred to ipMlModel.

Sample

The sample container is transferred to ipSample. The type of container must be ContainerType_Vector_REAL or ContainerType_Vector_LREAL.

Application

For example, an ML model can be trained with a sample as follows:

hr := F_VN_TrainSample(
    ipMlModel   := ipMlModel,
    ipSample    := ipSample,
    hrPrev      := hr);

Related functions

Required License

TC3 Machine Learning Realtime Inference

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4024.59 or later

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

Tc3_Vision