minmaxnormalizetransform

Normalizes test dataset using values computed on training data by 'minMaxNormalize' function.

Syntax

X_normalized = minmaxnormalizetransform(parameters,X)

Inputs

X
Input data to be normalized.
Type: double
Dimension: vector | matrix
parameters
Struct containing values such as minimum and maximum of each column of training data and minimum and maximum range specified for training data. It is the output of 'minMaxNormalize' function.
Type: double | integer
Dimension: struct

Outputs

X_normalized
Normalized input records.
Type: integer
Dimension: vector | matrix

Example

Usage of minmaxnormalizetransform

X = [1, -1, 2;
     2, 0, 0;
     0, 1, -1];
X_test = [-3 -1 4];
[X_scaled, parameters] = minmaxnormalize(X, [0.25, 0.35]);
X_test_scaled = minmaxnormalizetransform(parameters, X_test);
> X_scaled
X_scaled = [Matrix] 3 x 3
0.30000 0.25000 0.35000
0.35000 0.30000 0.28333
0.25000 0.35000 0.25000
> X_test_scaled
X_test_scaled = [Matrix] 1 x 3
0.10000 0.25000 0.41667