pcatransform

Transforms target values for the test data points using parameters computed by pcaFit function.

Attention: Available only with Twin Activate commercial edition.

Syntax

outputs = pcatransform(parameters,X)

Inputs

X
Test data.
Type: double
Dimension: vector | matrix
parameters
Output of agglomerativeFit function.
Type: struct

Outputs

outputs
Transformed output for the test data.
Type: double
Dimension: vector | matrix

Example

Usage of pcatransform with options

X = [-1, -1; -2, -1; -3, -2; 1, 1; 2, 1; 3, 2];
options = struct;
options.n_components = 2;
parameters = pcafit(X, options)
outputs = pcatransform(parameters, X);
> outputs
outputs = [Matrix] 6 x 2
 1.38341   0.29358
 2.22190  -0.25133
 3.60530   0.04224
-1.38341  -0.29358
-2.22190   0.25133
-3.60530  -0.04224