How can a decision tree handle missing values during training without imputation?

Quick Overview

Asks how a decision tree can train on data with missing values without imputing them first. Tests knowledge of C4.5 fractional weighting, learned default directions in XGBoost, LightGBM and scikit-learn, CART surrogate splits, missing-value categories, and when missingness carries signal.

How can a decision tree handle missing values during training without imputation?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

How can a decision tree handle missing values during training without imputation? Describe the main approaches used by classic tree algorithms and by modern gradient-boosting libraries, and what each does with a missing value at prediction time. ```hint Two separate problems A split needs a quality score, and after the split is chosen every training row has to go to a child. Treat the two steps separately. ``` ```hint Missing can carry signal Think about a dataset where rows with a missing value have a very different target rate from the rest, and ask which approaches could pick that up. ``` ### What a Strong Answer Covers - How split quality can be computed when some rows lack the feature - At least two ways to route missing rows once a split is chosen, and which algorithms or libraries use them - How the routing is applied again at prediction time - When missingness is informative, and which methods can use it - The downsides of imputing before training a tree ### Follow-up Questions - What happens at prediction time when a value is missing at a node where no training row was missing? - How does C4.5 produce a prediction for a test row with a missing value? - When would you still impute before training a tree? - How do surrogate splits compare with a learned default direction when missingness is informative?

Overview: Asks how a decision tree can train on data with missing values without imputing them first. Tests knowledge of C4.5 fractional weighting, learned default directions in XGBoost, LightGBM and scikit-learn, CART surrogate splits, missing-value categories, and when missingness carries signal.

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

How can a decision tree handle missing values during training without imputation? Describe the main approaches used by classic tree algorithms and by modern gradient-boosting libraries, and what each does with a missing value at prediction time.

What a Strong Answer Covers Guidance

  • How split quality can be computed when some rows lack the feature
  • At least two ways to route missing rows once a split is chosen, and which algorithms or libraries use them
  • How the routing is applied again at prediction time
  • When missingness is informative, and which methods can use it
  • The downsides of imputing before training a tree

Follow-up Questions Guidance

  • What happens at prediction time when a value is missing at a node where no training row was missing?
  • How does C4.5 produce a prediction for a test row with a missing value?
  • When would you still impute before training a tree?
  • How do surrogate splits compare with a learned default direction when missingness is informative?