rfrpredict

Predicts target values for the test data points using parameters computed by rfrFit function.

Syntax

predictions = rfrpredict(parameters,X)

Inputs

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

Outputs

predictions
Predictions for the test data.
Type: double
Dimension: vector | matrix

Example

Usage of rfrpredict

X = [1 2 3; 4 5 6; 7 8 9; 10 11 12; 13 14 15; 16 17 18; 19 20 21];
y = [1, 2, 3, 4, 5, 6, 7];
options = struct;
options.random_state = 3; options.criterion = 'mae';
parameters = rfrfit(X, y, options);
predictions = rfrpredict(parameters, [1.5 2.0 3; 8 9 3])
predictions = [Matrix] 1 x 2
1.50000  2.80000

Comments

It performs regression by construction of Forest of trees. Once the tree construction is over, it can be used for prediction.