EasyDeepLearn

How do decision trees handle missing values?

medium

Answer

  • Options: (1) surrogate splits (CART's approach): find a backup feature that best mimics the chosen split's partition — used when the primary feature is missing at prediction time.
  • (2) Default direction (XGBoost, LightGBM): during training, learn per split which direction — left or right — missing values should go.
  • (3) Sentinel value: encode missingness as a specific value (e.g., -9999) and let the tree branch on it — works but hides information.
  • (4) Impute first then train.
Check yourself — multiple choice
  • Trees can't handle missing data
  • Surrogate splits (CART) or a learned default direction (XGBoost/LightGBM) handle them natively
  • Trees must always drop rows with NaN
  • Only imputation works with trees

Surrogate splits (CART) or learned default direction (XGBoost/LightGBM) natively handle NaNs.

#decision-trees#missing-data#trees

Practise Supervised Learning

215 interview questions in this topic.

Related questions