Regression Tree

In Regression Trees, each partition evaluates the mean value of the kernel.

An overtraining example of the regression tree is when the algorithm reduces every partition to its own data. This can be avoided by setting the complexity parameter (cp) and the minimum number of observations in each partition. Below is an example of an overtrained tree, with cp = 0 and minsplit = 2.

There is an option to prune off branches, to make smaller trees, in search for better estimates. Below is an example over the previous tree.

In search of the best complexity parameter for the model, the regression tree uses cross-validation and finds the best one by calculating the residual sum of squares.