Predict responses using support vector machine (SVM) regression model
Statistics and Machine Learning Toolbox / Regression
The RegressionSVM Predict block predicts responses using an SVM regression
object (RegressionSVM
or CompactRegressionSVM
).
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.
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
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 RegressionSVM
or
CompactRegressionSVM
object by using discardSupportVectors
.
You can use a MATLAB Function block with the predict
object function of an SVM regression object (RegressionSVM
or 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
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.