internalsGet Pro

Module 11 · Lesson 2 of 13Pro

Missing values: dropping, filling or flagging

Level
Beginner
Topic
Data preparation and feature engineering
Reading time
13 min

When you finish this page you can

  1. Find out why a column has blanks by comparing the label rate with and without a value.
  2. Choose between dropping, filling and flagging, and say what each one costs on the day the model scores.
  3. Fill blanks with a value learned from training rows only, inside a scikit-learn pipeline.
  4. Explain how histogram gradient boosting handles blanks without a fill.
  1. Train, validation and test sets13 min
  2. Logistic regression: predicting probabilities13 min
  3. Gradient boosting: XGBoost, LightGBM and CatBoost18 min

Dropping blanks kept 3 rows in 10

is our example online store. Every Monday its model scores 200,000 customers, and the 20,000 most likely to stop buying get a ₹100 voucher. Farah, an ML engineer, wants three new : the average star rating a customer gave in reviews, their age, and how often they opened the app in the last 30 days.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan