Regression Trees
To interactively grow a regression tree, use the Regression Learner app. For greater flexibility, grow a regression tree using fitrtree at the command line. After growing a regression tree, predict responses by passing the tree and new predictor data to predict.
Apps
| Regression Learner | Train regression models to predict data using supervised machine learning | 
Blocks
| RegressionTree Predict | Predict responses using regression tree model (Since R2021a) | 
Functions
Objects
| RegressionTree | Regression tree | 
| CompactRegressionTree | Compact regression tree | 
| RegressionPartitionedModel | Cross-validated regression model | 
| RegressionChainEnsemble | Multiresponse regression model (Since R2024b) | 
| CompactRegressionChainEnsemble | Compact multiresponse regression model (Since R2024b) | 
Topics
- Train Regression Trees Using Regression Learner AppCreate and compare regression trees, and export trained models to make predictions for new data. 
- Supervised Learning Workflow and AlgorithmsUnderstand the steps for supervised learning and the characteristics of nonparametric classification and regression functions. 
- Decision TreesUnderstand decision trees and how to fit them to data. 
- Growing Decision TreesTo grow decision trees, fitctreeandfitrtreeapply the standard CART algorithm by default to the training data.
- View Decision TreeCreate and view a text or graphic description of a trained decision tree. 
- Improving Classification Trees and Regression TreesTune trees by setting name-value pair arguments in fitctreeandfitrtree.
- Prediction Using Classification and Regression TreesPredict class labels or responses using trained classification and regression trees. 
- Predict Out-of-Sample Responses of SubtreesPredict responses for new data using a trained regression tree, and then plot the results. 
- Predict Responses Using RegressionTree Predict BlockThis example shows how to use the RegressionTree Predict block for response prediction in Simulink®.