internalsGet Pro

Module 11 · Lesson 8 of 13Pro

Data leakage: when a model secretly cheats

Level
Intermediate
Topic
Data preparation and feature engineering
Reading time
16 min

When you finish this page you can

  1. Name the five routes by which the label reaches training data, and point to each in a churn pipeline.
  2. Explain why a model can leak even when every feature stops at the snapshot date.
  3. Screen a training table for leaks with single-feature scores and a check for customers on both sides of the split.
  4. Choose the check a new feature set must pass before its predictions are used.
  1. Data, features and labels14 min
  2. Train, validation and test sets13 min
  3. Cross-validation: getting more from little data17 min
  4. Encoding categories as numbers14 min

Every date checks out, and the score is still wrong

is our example online store. Its ML team works on a notebook sample of about 1 million orders from 200,000 customers. Every Monday, a model ranks those customers by how likely they are to stop buying, and Joseph’s growth team sends vouchers to the top 20,000.

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