Why do squared-error and absolute-error regression trees predict different constants in the same leaf?
Classic MLLevel: IntermediateRegression leaf statistic
Why do squared-error and absolute-error regression trees predict different constants in the same leaf?
Hints
- Minimize each loss over a single constant.
- The leaf prediction is part of the objective.
Answer
Squared error is minimized by the mean; absolute error by a median. Thus changing the criterion changes both split selection and the optimal terminal prediction.
Source and licence: scikit-learn 1.7.2 — tree · BSD-3-Clause · answer: Quantoros editorial