What is a decision tree?

Quick Overview

A foundational machine learning question asking what a decision tree is and how it turns a sequence of feature tests into a prediction. Tests whether you can explain how splits are chosen, how tree growth is limited, and the strengths and weaknesses of a single tree.

What is a decision tree?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

What is a decision tree? ```hint Follow one sample Describe what happens to a single input row from the top of the tree to the prediction, then ask how those questions were chosen during training. ``` ### What a Strong Answer Covers - How a prediction is made: the path of feature tests from root to leaf, and what a leaf outputs for classification and for regression. - How the tree is grown: the split criterion and the greedy, recursive search. - How tree size is controlled through stopping rules and pruning. - Strengths and weaknesses, in particular the high variance of a single tree and why ensembles are used. ### Follow-up Questions - How is the best threshold found for a numeric feature, and what does that search cost? - Compute the Gini impurity of a node with 6 positives and 4 negatives, and the impurity reduction of a split you choose. - Why does a deep tree have high variance, and how do bagging and random forests reduce it? - How should a tree handle a categorical feature with hundreds of levels, and what goes wrong if you do nothing?

Overview: A foundational machine learning question asking what a decision tree is and how it turns a sequence of feature tests into a prediction. Tests whether you can explain how splits are chosen, how tree growth is limited, and the strengths and weaknesses of a single tree.

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

What is a decision tree?

What a Strong Answer Covers Guidance

  • How a prediction is made: the path of feature tests from root to leaf, and what a leaf outputs for classification and for regression.
  • How the tree is grown: the split criterion and the greedy, recursive search.
  • How tree size is controlled through stopping rules and pruning.
  • Strengths and weaknesses, in particular the high variance of a single tree and why ensembles are used.

Follow-up Questions Guidance

  • How is the best threshold found for a numeric feature, and what does that search cost?
  • Compute the Gini impurity of a node with 6 positives and 4 negatives, and the impurity reduction of a split you choose.
  • Why does a deep tree have high variance, and how do bagging and random forests reduce it?
  • How should a tree handle a categorical feature with hundreds of levels, and what goes wrong if you do nothing?