GetTransformParameters

Get the learned parameters of a feature transform model (e.g., PCA or LDA). Returns the component scores, the projection matrix, and optionally the mean vector. For PCA, the scores are eigenvalues representing the variance captured by each component. For LDA, the scores are eigenvalues representing the discriminative power of each component. Components are ordered by decreasing importance.

Syntax

Definition:

HRESULT GetTransformParameters(
    HRESULT          hrPrev,
    ITcVnMlModel*    ipModel,
    ITcVnContainer*& ipScores,
    ITcVnContainer*& ipProjectionVectors,
    ITcVnContainer** pipMean = nullptr
)

Parameters

Name

Type

Default

Description

hrPrev

HRESULT

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

ipModel

ITcVnMlModel*

Trained feature transform model (e.g., PCA or LDA).

ipScores

ITcVnContainer*&

Container holding the component scores, sorted in descending order of importance. For PCA and LDA, these represent the eigenvalues. The container type depends on the model (ContainerType_Vector_REAL for PCA, ContainerType_Vector_LREAL for LDA).

ipProjectionVectors

ITcVnContainer*&

Container holding the projection vectors, where each inner vector represents one component direction, ordered consistently with the scores. For PCA and LDA, these represent the eigenvectors. The container type depends on the model (ContainerType_Vector_Vector_REAL for PCA, ContainerType_Vector_Vector_LREAL for LDA).

pipMean

ITcVnContainer**

nullptr

Container holding the mean vector used for centering. The container type depends on the model (ContainerType_Vector_REAL for PCA). For LDA, the mean is not applicable and the container will be set to 0. Optional, set to 0 if not required.

 Return value

HRESULT

Required License

TC3 Machine Learning Realtime Inference

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4026 or later

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

Tc3_Vision