How do you handle missing values in a production pipeline?
mediumAnswer
- (1) Categorize: MCAR (random), MAR (depends on observed), MNAR (depends on missing itself).
- (2) Simple: mean/median (numeric) or mode/'missing' category (categorical).
- (3) Model-based: KNN-imputation, iterative imputer (MICE), matrix completion.
- (4) Tree models handle missing natively (XGBoost, LightGBM).
- (5) Add binary '' indicator feature — often predictive.
- (6) NEVER impute using future data — leaks.
- (7) Monitor missing rate per feature — spike = upstream issue.
Check yourself — multiple choice
- Just drop
- MCAR/MAR/MNAR categorization → mean/median/mode simple / KNN/MICE model-based / tree native / add indicator; never leak future; monitor rate
- Random
- Zero-fill always
Missing values: indicator + monitor.
#data-quality#features
Practise MLOps & Data Quality
215 interview questions in this topic.
Related questions
- What is point-in-time correctness in feature stores?
- How do you guarantee online-offline feature consistency?
- How do you prove there is no training-serving skew?
- What is point-in-time correctness, and how does violating it look in practice?
- What is data drift and how do you detect it?
- How is concept drift different from data drift?