predict
Predict response of Gaussian process regression model
Syntax
Description
Examples
Input Arguments
Output Arguments
Tips
You can choose the prediction method while training the GPR model using the
PredictMethod
name-value pair argument infitrgp
. The default prediction method is'exact'
for n ≤ 10000, where n is the number of observations in the training data, and'bcd'
(block coordinate descent), otherwise.Computation of standard deviations,
ysd
, and prediction intervals,yint
, is not supported whenPredictMethod
is'bcd'
.If
gprMdl
is aCompactRegressionGP
object, you cannot compute standard deviations,ysd
, or prediction intervals,yint
, forPredictMethod
equal to'sr'
or'fic'
. To computeysd
andyint
forPredictMethod
equal to'sr'
or'fic'
, use the full regression (RegressionGP
) object.
Alternatives
You can use resubPredict
to compute the predicted responses for the trained GPR
model at the observations in the training data.
Simulink Block
To integrate the prediction of a Gaussian process regression model into
Simulink®, you can use the RegressionGP
Predict block in the Statistics and Machine Learning Toolbox™ library or a MATLAB® Function block with the predict
function. For
examples, see Predict Responses Using RegressionGP Predict Block and Predict Class Labels Using MATLAB Function Block.
When deciding which approach to use, consider the following:
If you use the Statistics and Machine Learning Toolbox library block, you can use the Fixed-Point Tool (Fixed-Point Designer) to convert a floating-point model to fixed point.
Support for variable-size arrays must be enabled for a MATLAB Function block with the
predict
function.If you use a MATLAB Function block, you can use MATLAB functions for preprocessing or post-processing before or after predictions in the same MATLAB Function block.
Extended Capabilities
Version History
Introduced in R2015bSee Also
fitrgp
| RegressionGP
| CompactRegressionGP
| compact
| resubPredict
| loss