F_VN_FeatureScalingExp

F_VN_FeatureScalingExp 1:

Apply a feature scaling to one or more sample(s) and get output range between [fA, fB] in the case of TCVN_FST1_MINMAX. (expert function)

Syntax

Definition:

FUNCTION F_VN_FeatureScalingExp : HRESULT
VAR_INPUT
    ipSamples       : ITcVnContainer;
    ipScales        : ITcVnContainer;
    ipScaledSamples : Reference To ITcVnContainer;
    fA              : LREAL;
    fB              : LREAL;
    hrPrev          : HRESULT;
END_VAR

F_VN_FeatureScalingExp 2: Inputs

Name

Type

Description

ipSamples

ITcVnContainer

Container holding one or more input sample(s) (ContainerType_Vector_REAL, ContainerType_Vector_LREAL, ContainerType_Vector_Vector_REAL, or ContainerType_Vector_Vector_LREAL)

ipScales

ITcVnContainer

Container with the scaling parameters of each feature (type ContainerType_Vector_REAL or ContainerType_Vector_LREAL).

ipScaledSamples

Reference To ITcVnContainer

Returns the scaled sample(s) using the same type like ipSamples. If the same container ipSamples is uesd, the source data will be replaced.

fA

LREAL

represents the lower bound of the range for TCVN_FST1_MINMAX

fB

LREAL

represents the upper bound of the range for TCVN_FST1_MINMAX

hrPrev

HRESULT

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

F_VN_FeatureScalingExp 3: Return value

HRESULT

Weiterführende Informationen

Die Funktion F_VN_FeatureScalingExp ist die Expert-Variante von F_VN_FeatureScaling. Sie enthält zusätzliche Parameter.

Parameter

Samples

Ein oder mehrere Samples müssen als Container an ipSamples übergeben werden.

Skalierung

Ein Container mit dem Skalierungstyp und den entsprechenden Skalierungsparametern muss an ipScales übergeben werden. Der Container kann durch die Funktion F_VN_GetFeatureScales berechnet oder nach dem dort beschriebenen Aufbau selbst erstellt werden.

Skalierte Samples

Die skalierten Samples werden über die Referenz ipScaledSamples zurückgegeben.

Festlegen des Ausgabebereichs

Wenn der Skalierungstyp TCVN_FST1_MINMAX verwendet wird, kann über fA und fB zusätzlich der Wertebereich der Ausgabewerte vorgegeben werden.

Anwendung

Eine Merkmalsskalierung mit einem Ausgabewertebereich von 0,1 bis 0,9 sieht z.B. so aus:

hr := F_VN_FeatureScalingExp(
    ipSamples       := ipSamples,
    ipScales        := ipScales,
    ipScaledSamples := ipScaledSamples,
    fA              := 0.1,
    fB              := 0.9,
    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