Predict responses using support vector machine (SVM) regression model
Statistics and Machine Learning Toolbox / Regression
Import a trained SVM regression object into the block by specifying the name of a workspace variable that contains the object. The input port x receives an observation (predictor data), and the output port yfit returns a predicted response for the observation.
x— Predictor data
Predictor data, specified as a column vector or row vector of one observation.
The variables in x must have the same
order as the predictor variables that trained the SVM model
Select trained machine learning
If you set
training the SVM model, then the RegressionSVM
Predict block standardizes the values of
x using the means and standard
deviations in the
Sigma properties (respectively) of
the SVM model.
If you are using a linear SVM model and it has many support vectors, then
prediction can be slow. To efficiently predict responses based on a linear SVM
model, remove the support vectors from the
CompactRegressionSVM object by using
You can use a MATLAB Function block with the
predict object function of an SVM regression object (
CompactRegressionSVM). For an example, see
Predict Class Labels Using MATLAB Function Block.
When deciding whether to use the RegressionSVM Predict block in the
Statistics and Machine Learning Toolbox™ library or a MATLAB Function block with the
predict function, consider
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
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.
Behavior changed in R2021a
Starting in R2021a, the Kernel data type parameter does not support inherited options. You can specify Kernel data type as a supported data type name or data type object.