F_VN_FeatureScalingExp
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
Inputs
Name |
Type |
Description |
---|---|---|
ipSamples |
Container holding one or more input sample(s) (ContainerType_Vector_REAL, ContainerType_Vector_LREAL, ContainerType_Vector_Vector_REAL, or ContainerType_Vector_Vector_LREAL) | |
ipScales |
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 indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
Further information
The function F_VN_FeatureScalingExp
is the expert variant of F_VN_FeatureScaling. It contains additional parameters.
Parameter
Samples
One or more samples must be transferred as a container to ipSamples
.
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 samples
The scaled samples are returned via the reference ipScaledSamples
.
Defining the output range
If the scaling type TCVN_FST1_MINMAX
is used, the value range of the output values can also be specified via fA
and fB
.
Application
For example, a feature scaling with an output value range of 0.1 to 0.9 looks like this:
hr := F_VN_FeatureScalingExp(
ipSamples := ipSamples,
ipScales := ipScales,
ipScaledSamples := ipScaledSamples,
fA := 0.1,
fB := 0.9,
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 |