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

Weiterführende Informationen

Die Funktion F_VN_GetBatchClusters ermittelt für alle Samples in einem Container das jeweils am besten passende Cluster und gibt dessen ID zurück.

Parameter

Clusterer-Modell

Für die Zuordnung zu Clustern muss ein zuvor trainiertes Modell an ipClusterer übergeben werden.

Samples

Ein Container mit den Samples wird an ipSamples übergeben. Der Typ des Containers muss ContainerType_Vector_Vector_REAL oder ContainerType_Vector_Vector_LREAL sein.

Cluster-IDs

Ein Container mit den ermittelten IDs wird über die Referenz ipClusters zurückgegeben.

Expert-Parameter

Die Expert-Variante F_VN_GetBatchClustersExp enthält zusätzliche Parameter.

Anwendung

Die Zuordnung von Samples zu Clustern kann so berechnet werden:

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

Verwandte Funktionen

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