How to build a regression tree
Regression trees make predictions based on the mean outcome value for the training samples assigned to a given node and typically rely on the mean-squared error to select optimal rules during recursive binary splitting.
Given a training set, the algorithm iterates over the predictors, X1, X2, ..., Xp, and possible cutpoints, s1, s1, ..., sN, to find an optimal combination. The optimal rule splits the feature space into two regions, {X|Xi < sj} and {X|Xi > sj}, with values for the Xi feature either below or above the sj threshold so that predictions based on the training subsets maximize the reduction of the squared residuals relative to the current node.
Let's start with a simplified example to facilitate visualization ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access