LearnQuestion bank

Compare strategies for missing data, and when is “missingness” itself a signal?

ML engineeringTechnicalEasy

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Start with the mechanism: MCAR, MAR, MNAR.
  • Compare simple imputation plus indicator flags.
  • Compare model-based imputation.
  • Compare native GBDT handling of missing values.
  • Fit imputers on train only.
  • Keep missingness as a signal with a flag.
  • Monitor missing rates in production.

In full

The right strategy depends on why data are missing: under MCAR, complete-case analysis is unbiased and mean imputation preserves the mean, though both lose information or understate variance; under MAR, imputation can work if the imputation model uses observed predictors; under MNAR, missingness depends on the unobserved value itself, so imputation alone can bias results and the missingness pattern should be modelled or flagged. In practice I compare simple imputation with a missingness indicator (fast, robust, keeps absence visible), model-based imputation such as regression/KNN/MICE (better when missingness is MAR and relationships are nonlinear, but it adds assumptions and uncertainty), and native GBDT handling of missing values (often strong because trees can learn splits around missingness, though it does not remove the need to understand the mechanism). I fit imputers, encoders, and any missingness models on the training folds only, then apply them unchanged to validation/test and production. I keep a missingness flag whenever absence is itself informative—for example, no device fingerprint may mean a bot, a privacy-restricted session, or a different user segment—so I do not impute it away and then pretend the feature is ordinary. Finally, I monitor missing rates and missingness patterns in production, because a shift in missingness can signal upstream breakage, a new segment, or MNAR behaviour and can invalidate the model even when accuracy looks stable.

Corrected by an independent AI reviewer.

What a strong answer covers

  • Understand the mechanism (MCAR, MAR, MNAR).
  • Simple imputation plus indicator flags; model-based imputation; native handling in GBDTs.
  • Fit imputers on train only.
  • Missingness can be informative (e.g. no device fingerprint), so keep a flag.
  • Monitor missing rates in production.

Common mistakes

  • mean-imputing across the full dataset before splitting
  • silently dropping rows and biasing the sample.