F_VN_InverseFeatureScaling_REAL

F_VN_InverseFeatureScaling_REAL 1:

Apply the inverse of feature scaling to a single value.

Syntax

Definition:

FUNCTION F_VN_InverseFeatureScaling_REAL : HRESULT
VAR_INPUT
    fSample        : REAL;
    ipScales       : ITcVnContainer;
END_VAR
VAR_IN_OUT
    fInverseSample : REAL;
END_VAR
VAR_INPUT
    hrPrev         : HRESULT;
END_VAR

F_VN_InverseFeatureScaling_REAL 2: Inputs

Name

Type

Description

fSample

REAL

Sample value

ipScales

ITcVnContainer

Container with the scaling parameters of each feature (type 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_InverseFeatureScaling_REAL 3: In/Outputs

Name

Type

Description

fInverseSample

REAL

Returns the inversed sample.

F_VN_InverseFeatureScaling_REAL 4: Return value

HRESULT

Further information

The function F_VN_InverseFeatureScaling_REAL inverts the scaling of a sample with only one feature or the prediction value of a scalar regressor. The function F_VN_FeatureScaling can be used for scaling.

Parameter

Samples

A sample of the type REAL must be transferred to fSample.

Scaling

A container with the scaling type and the corresponding scaling parameters must be transferred to ipScales. The container can be calculated using the function F_VN_GetFeatureScales or created using the structure described there.

Scaled sample

The inversely scaled feature is returned via fInverseSample.

Expert parameters

The expert variant F_VN_InverseFeatureScalingExp_REAL contains additional parameters.

Application

For example, an inverse feature scaling for a sample looks like this:

hr := F_VN_eatureScaling_REAL(
    fSample        := fSample,
    ipScales       := ipScales,
    fInverseSample := fSampleInvertedScaling,
    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