Predict responses using regression tree model
Statistics and Machine Learning Toolbox / Regression
Import a trained 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.
You can use a MATLAB Function block with the
predict object function of a regression tree object (
CompactRegressionTree). For an example, see
Predict Class Labels Using MATLAB Function Block.
When deciding whether to use the RegressionTree 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.