ridgepredict

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

Attention: Available only with Activate commercial edition.

Syntax

predictions = ridgepredict(parameters,X)

Inputs

parameters
Output of ridgeFit 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 ridgepredict

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.to_normalize = true;
options.l2_penalty = 0.03;
parameters = ridgefit(X, y, options);
predictions = ridgepredict(parameters, [1.5 2.0 3; 8 9 3])
predictions
[Matrix] 2 x 1
 8.32715
17.31431