How does a decision tree make a prediction for a classification task?

Quick Overview

Asks how a trained decision tree turns a new sample into a class label and class probabilities. Tests whether you can describe root-to-leaf traversal, what a leaf stores, the geometric view of the splits and the cost of a prediction.

How does a decision tree make a prediction for a classification task?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

How does a decision tree make a prediction for a classification task? ```hint Follow one instance Trace a single new sample from the root. What decides each step, and what is stored at the node where it stops? ``` ### What a Strong Answer Covers - The root-to-leaf traversal, with one feature test per internal node. - How a leaf turns the training class counts it stores into a predicted label and into class probabilities. - The geometric view of leaves as axis-aligned regions of feature space. - The cost of a prediction in terms of tree depth. ### Follow-up Questions - How does a regression tree's prediction differ from a classification tree's? - Why are leaf-count probabilities from a deep tree often poorly calibrated, and what would you do about it? - How does a random forest combine the predictions of its trees? - How can a tree handle a sample whose value is missing for the feature tested at a node?

Overview: Asks how a trained decision tree turns a new sample into a class label and class probabilities. Tests whether you can describe root-to-leaf traversal, what a leaf stores, the geometric view of the splits and the cost of a prediction.

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

How does a decision tree make a prediction for a classification task?

What a Strong Answer Covers Guidance

  • The root-to-leaf traversal, with one feature test per internal node.
  • How a leaf turns the training class counts it stores into a predicted label and into class probabilities.
  • The geometric view of leaves as axis-aligned regions of feature space.
  • The cost of a prediction in terms of tree depth.

Follow-up Questions Guidance

  • How does a regression tree's prediction differ from a classification tree's?
  • Why are leaf-count probabilities from a deep tree often poorly calibrated, and what would you do about it?
  • How does a random forest combine the predictions of its trees?
  • How can a tree handle a sample whose value is missing for the feature tested at a node?