How does a decision tree output class probability estimates for an input instance?

Quick Overview

Asks how a decision tree turns the training samples in a leaf into class probability estimates for a new instance. Tests whether you know why deep trees give overconfident, coarse probabilities and how growth limits, smoothing, calibration and ensembles improve them.

How does a decision tree output class probability estimates for an input instance?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

How does a decision tree output class probability estimates for an input instance? ```hint Where the number comes from Follow the instance down to the node where it stops, and think about what that node remembers from training. ``` ### What a Strong Answer Covers - How the instance reaches a leaf and what per-class information the leaf stores - The formula for the class probability, including the effect of sample or class weights - Why fully grown trees and small leaves give overconfident, coarse probabilities, and what that does to ranking metrics such as AUC - Practical ways to get better probabilities: limiting growth, smoothing, calibration and ensembling ### Follow-up Questions - How would you check whether a tree's probabilities are well calibrated? - Why does a random forest usually give better probability estimates than a single tree? - When would you pick isotonic calibration over sigmoid (Platt) calibration for a tree model? - How does `class_weight="balanced"` change the probabilities a leaf reports, and what does that mean for the decision threshold?

Overview: Asks how a decision tree turns the training samples in a leaf into class probability estimates for a new instance. Tests whether you know why deep trees give overconfident, coarse probabilities and how growth limits, smoothing, calibration and ensembles improve them.

Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

How does a decision tree output class probability estimates for an input instance?

What a Strong Answer Covers Guidance

  • How the instance reaches a leaf and what per-class information the leaf stores
  • The formula for the class probability, including the effect of sample or class weights
  • Why fully grown trees and small leaves give overconfident, coarse probabilities, and what that does to ranking metrics such as AUC
  • Practical ways to get better probabilities: limiting growth, smoothing, calibration and ensembling

Follow-up Questions Guidance

  • How would you check whether a tree's probabilities are well calibrated?
  • Why does a random forest usually give better probability estimates than a single tree?
  • When would you pick isotonic calibration over sigmoid (Platt) calibration for a tree model?
  • How does class_weight="balanced" change the probabilities a leaf reports, and what does that mean for the decision threshold?