Why can regression trees not extrapolate beyond the range of the training data?

Quick Overview

Asks why regression trees and tree ensembles cannot predict values outside the range of their training data. Tests understanding of how tree leaves form predictions, how the limitation affects trending time series, and which modeling changes restore extrapolation.

Why can regression trees not extrapolate beyond the range of the training data?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why can regression trees not extrapolate beyond the range of the training data? ```hint Shape of the fitted function Sketch what a fitted regression tree looks like as a function of one input. What does a leaf predict, and what region of the input space does the outermost leaf cover? ``` ```hint Check the ensembles too Random forests and gradient boosting combine many trees. Does averaging or adding tree outputs change the behavior far from the training data? ``` ### What a Strong Answer Covers - Why a regression tree is piecewise constant and what each leaf predicts - What happens to an input beyond the training range, and the resulting bound on predictions - Practical cases where the limitation causes damage, such as trending time series - Whether random forests and gradient boosting share the limitation - Remedies that restore some ability to extrapolate ### Follow-up Questions - How would you forecast a sales series with a steady upward trend using gradient boosting? - Is a gradient boosting prediction guaranteed to stay within the minimum and maximum training target, as a single tree's is? - What new risks do linear models in the leaves introduce? - How would you detect at serving time that a request falls outside the range the model was trained on?

Overview: Asks why regression trees and tree ensembles cannot predict values outside the range of their training data. Tests understanding of how tree leaves form predictions, how the limitation affects trending time series, and which modeling changes restore extrapolation.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Why can regression trees not extrapolate beyond the range of the training data?

What a Strong Answer Covers Guidance

  • Why a regression tree is piecewise constant and what each leaf predicts
  • What happens to an input beyond the training range, and the resulting bound on predictions
  • Practical cases where the limitation causes damage, such as trending time series
  • Whether random forests and gradient boosting share the limitation
  • Remedies that restore some ability to extrapolate

Follow-up Questions Guidance

  • How would you forecast a sales series with a steady upward trend using gradient boosting?
  • Is a gradient boosting prediction guaranteed to stay within the minimum and maximum training target, as a single tree's is?
  • What new risks do linear models in the leaves introduce?
  • How would you detect at serving time that a request falls outside the range the model was trained on?