polyfeaturestransform
Generate polynomial features for test data.
Attention: Available only with Twin Activate commercial edition.
Syntax
X_poly = polyfeaturestransform(parameters,X)
Inputs
- X
- Input data for which polynomial features are going to be generated.
- parameters
- Struct containing degree used by polyFeatures function.
Outputs
- X_poly
- Polynomial features of input.
Example
Usage of polyfeaturestransform
X = [0 1;
2 3;
4 5];
X_test = [1 5];
[X_poly, parameters] = polyfeatures(X, 3);
X_test_poly = polyfeaturestransform(parameters, X_test)
> X_test_poly
X_test_poly = [Matrix] 1 x 9
1 5 1 5 25 1 5 25 125