Why is a decision tree considered a non-linear model despite using simple threshold splits?

Quick Overview

Asks why a decision tree is a non-linear model even though each split is a simple threshold on one feature. Tests understanding of piecewise-constant predictions, feature interactions from nested splits, the decision boundaries trees can draw, and why trees do not extrapolate.

Why is a decision tree considered a non-linear model despite using simple threshold splits?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Why is a decision tree considered a non-linear model despite using simple threshold splits? ```hint Write the prediction down Express what a fitted tree predicts as a function of the input $x$, and compare that function with $w^\top x + b$. ``` ### What a Strong Answer Covers - The tree's prediction written as a piecewise-constant function over leaf regions. - How nested splits create interactions between features. - The shapes of decision boundary a tree can produce, compared with a linear model. - A practical consequence of the piecewise-constant form, such as the lack of extrapolation. ### Follow-up Questions - How well can a tree represent a diagonal boundary such as $x_1 > x_2$, and how could you help it? - Why does a tree predict a constant outside the training range, and what would you use if extrapolation matters? - A random forest averages many trees. Is its prediction still piecewise constant?

Overview: Asks why a decision tree is a non-linear model even though each split is a simple threshold on one feature. Tests understanding of piecewise-constant predictions, feature interactions from nested splits, the decision boundaries trees can draw, and why trees do not extrapolate.

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

Why is a decision tree considered a non-linear model despite using simple threshold splits?

What a Strong Answer Covers Guidance

  • The tree's prediction written as a piecewise-constant function over leaf regions.
  • How nested splits create interactions between features.
  • The shapes of decision boundary a tree can produce, compared with a linear model.
  • A practical consequence of the piecewise-constant form, such as the lack of extrapolation.

Follow-up Questions Guidance

  • How well can a tree represent a diagonal boundary such as x1>x2x_1 > x_2 , and how could you help it?
  • Why does a tree predict a constant outside the training range, and what would you use if extrapolation matters?
  • A random forest averages many trees. Is its prediction still piecewise constant?