A regression tree is grown on x=1,2,3,4,5,6 with y=2,3,2,9,10,8. Which threshold does the first split choose using the sum of squared errors (SSE), and what are the leaf predictions and the SSE reduction?

Supervised learning, Regression trees
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can choose a regression-tree split by minimising the within-leaf SSE and report leaf means as predictions.

Key idea

Each leaf predicts the mean of its y values. The best threshold minimises SSEL+SSER, with SSE=∑(y−yˉ)2 in each leaf.

Steps

  1. Total SSE before splitting: yˉ=34/6=5.667. SSE =∑y2−nyˉ2=262−6(32.11)=69.33.
  2. Candidate thresholds lie between neighbouring x values. Threshold 1.5: left {2} has SSE 0 and right {3,2,9,10,8} has SSE 53.2, total 53.2. Threshold 2.5: left {2,3} has SSE 0.5 and right {2,9,10,8} has SSE 38.75, total 39.25.
  3. Threshold 3.5: left {2,3,2} has mean 7/3 and SSE 0.667. Right {9,10,8} has mean 9 and SSE 2. Total 2.667.
  4. Thresholds 4.5 and 5.5 give totals 36 and 62.8, so the best split is at x=3.5.
  5. Leaf predictions are 7/3≈2.33 (left) and 9 (right). The SSE reduction is 69.33−2.67=66.67.
  6. The two clusters (low y for x≤3, high y for x≥4) match what we expected from the data.

Common mistakes

How long your answer should be

Half a page with a small table of thresholds.

Read this

Previous in Supervised learning: In round 1 of AdaBoost on n=10 points with equal weights 0.1, a stump misclassifies 3 points. What are its error ε, its weight α, and the new normalised weights of the misclassified and the correctly classified points?
Next in Supervised learning: In cost-complexity pruning, the cost of a tree is Rα(T)=R(T)+α∣T∣, where R(T) is the training error rate and ∣T∣ the number of leaves. Node t (as a leaf) has R(t)=0.10, and the subtree below it has 4 leaves with total error R(Tt)=0.04. Node u in another branch has R(u)=0.06, and its subtree has 2 leaves with R(Tu)=0.03. At what α is each pruned, which goes first, and how is α chosen?