F_VN_GetBatchClustersExp
Get the IDs of the best-matching clusters of a batch of samples.
Syntax
Definition:
FUNCTION F_VN_GetBatchClustersExp : HRESULT
VAR_INPUT
ipClusterer : ITcVnMlModel;
ipSamples : ITcUnknown;
ipClusters : Reference To ITcVnContainer;
ipNovelties : Reference To ITcVnContainer;
hrPrev : HRESULT;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
ipClusterer |
Clusterer to be used | |
ipSamples |
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) |
ipNovelties |
Reference To ITcVnContainer |
Returns the degree of novelty (0.0 if a sample is completely known; > 0.0 otherwise) of each sample (ContainerType_Vector_REAL; optional, set to 0 if not required) |
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
Further information
The function F_VN_GetBatchClustersExp
is the expert variant of F_VN_GetBatchClusters. It contains additional parameters.
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
.
Degrees of novelty
A container with the degrees of novelty of each sample is returned via the reference ipNovelties
. The degree of novelty indicates how strongly a sample differs from the clusters. A degree of novelty of 0
indicates that a sample lies exactly in the center of a cluster.
Application
The assignment of samples to clusters, including the degrees of novelty, can be calculated as follows:
hr := F_VN_GetBatchClustersExp(
ipClusterer := ipClusterer,
ipSamples := ipSamples,
ipClusters := ipClusters,
ipNovelties := ipNovelties,
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 |