The solid curve is the test error
and the dashed curve is the training error . As the horizontal coordinate tends to , , so every penalized slope tends to zero and . The two limits are therefore
respectively.
As the horizontal coordinate tends to , and the fit approaches the ordinary least squares fit . Hence the solid curve tends to , which the plot shows is approximately .
The classification form of CART starts with the root rectangle . For any current region , let and let
be its empirical class proportion and Gini impurity. A candidate axis-aligned split partitions into and . Its impurity change is
Among all coordinates and thresholds between consecutive observed coordinates, CART chooses a split minimizing , then applies the same recursive partitioning independently to the children until a stopping rule is met. Each terminal region predicts its majority class. Pruning may then select a smaller subtree by penalizing the number of leaves.
For the resulting classifier , the training error is
while its prediction error is for an independent observation drawn from the target population.