How does a decision tree make a prediction for a regression problem?

Quick Overview

Asks how a regression decision tree turns a new input into a numeric prediction and what that means for the shape of its outputs. Tests understanding of leaf values under different split criteria, piecewise constant predictions, extrapolation limits and the effect of leaf size.

How does a decision tree make a prediction for a regression problem?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

A decision tree for classification routes an instance to a leaf and outputs a class. How does a decision tree make a prediction for a regression problem, and what does that imply about the predictions it can produce? ```hint Think about the leaf Ask which single number, computed from the training targets that ended up in a leaf, minimizes the loss the tree was trained with. ``` ### What a Strong Answer Covers - How a new instance is routed to a leaf - What value the leaf returns, and how that depends on the split criterion - The shape of the resulting prediction function, including what happens outside the training range - How leaf size affects how noisy the predictions are ### Follow-up Questions - Why does the mean minimize squared error and the median minimize absolute error within a leaf? - How would you get sensible predictions for inputs beyond the training range when using trees? - How do random forests and gradient boosting turn the leaves of many trees into one regression prediction? - How does a regression tree choose its splits?

Overview: Asks how a regression decision tree turns a new input into a numeric prediction and what that means for the shape of its outputs. Tests understanding of leaf values under different split criteria, piecewise constant predictions, extrapolation limits and the effect of leaf size.

General logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

A decision tree for classification routes an instance to a leaf and outputs a class. How does a decision tree make a prediction for a regression problem, and what does that imply about the predictions it can produce?

What a Strong Answer Covers Guidance

  • How a new instance is routed to a leaf
  • What value the leaf returns, and how that depends on the split criterion
  • The shape of the resulting prediction function, including what happens outside the training range
  • How leaf size affects how noisy the predictions are

Follow-up Questions Guidance

  • Why does the mean minimize squared error and the median minimize absolute error within a leaf?
  • How would you get sensible predictions for inputs beyond the training range when using trees?
  • How do random forests and gradient boosting turn the leaves of many trees into one regression prediction?
  • How does a regression tree choose its splits?