F_VN_GetBatchClusters

F_VN_GetBatchClusters 1:

Get the IDs of the best-matching clusters of a batch of samples.

Syntax

Definition:

FUNCTION F_VN_GetBatchClusters : HRESULT
VAR_INPUT
    ipClusterer : ITcVnMlModel;
    ipSamples   : ITcUnknown;
    ipClusters  : Reference To ITcVnContainer;
    hrPrev      : HRESULT;
END_VAR

F_VN_GetBatchClusters 2: Inputs

Name

Type

Description

ipClusterer

ITcVnMlModel

Clusterer to be used

ipSamples

ITcUnknown

Container holding a batch of input samples (ContainerType_Vector_Vector_REAL or ContainerType_Vector_Vector_LREAL)

ipClusters

Reference To ITcVnContainer

Returns the cluster IDs (ContainerType_Vector_DINT)

hrPrev

HRESULT

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

F_VN_GetBatchClusters 3: Return value

HRESULT

Further information

The function F_VN_GetBatchClusters determines the best matching cluster for all samples in a container and returns its ID.

Parameter

Clusterer model

A previously trained model must be transferred to ipClusterer for assignment to clusters.

Samples

A container with the samples is transferred to ipSamples. The type of container must be ContainerType_Vector_Vector_REAL or ContainerType_Vector_Vector_LREAL.

Cluster IDs

A container with the determined IDs is returned via the reference ipClusters.

Expert parameters

The expert variant F_VN_GetBatchClustersExp contains additional parameters.

Application

The assignment of samples to clusters can be calculated in this way:

hr := F_VN_GetBatchClusters(
    ipClusterer := ipClusterer,
    ipSamples   := ipSamples,
    ipClusters  := ipClusters,
    hrPrev      := hr);

Related functions

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