Skip to main content
Learn AI Create the Future — with Pranay
  • Learn
  • Paths
  • Projects
  • Practice
  • Glossary
  • Errors
  • LeetCode
  • Main site

Main site →
Select language

Translation is unavailable right now. Your browser’s own “Translate page” usually works.

Machine translation by Google

Topics

  • 🧱 Foundations 2 sections
  • 🤖 Machine Learning 11 sections
  • 📊 Statistics and Experiments 4 sections
  • 🧭 Doing the Work 9 sections
    • Scoping an ML Project 11 lessons
    • Baselines and Choosing a Model 9 lessons
    • Reading Training Curves 7 lessons
    • Data Leakage and Results That Are Too Good 11 lessons
      • Overview
      • Your model scores 99%: what to suspect first
      • Target leakage: features that contain the answer
      • Duplicate rows across your splits
      • Fitting the scaler before splitting
      • Using the future to predict the past
      • The same person in train and test
      • Leakage that survives cross-validation
      • Choosing features on the full dataset
      • Overfitting your own test set
      • Did the model already see your test set?
      • Hunting a leak with ablations
    • Reproducibility and Running Experiments 6 lessons
    • ML Code That Survives 7 lessons
    • Reading and Reimplementing Papers 9 lessons
    • AI Projects 9 lessons
    • ML Interview Preparation 10 lessons
  • 🧠 Deep Learning 11 sections
  • 🧰 Libraries and Frameworks 4 sections
  • 💬 Language and NLP 15 sections
  • 👁️ Computer Vision 13 sections
  • 🎙️ Speech, Forecasting and Recommenders 3 sections
  • ✨ Generative AI and LLMs 4 sections
  • 🔬 Inside a Transformer 11 sections
  • ⚙️ Production and MLOps 16 sections
  • 🌍 AI in the Real World 12 sections
  • ⚖️ Safety, Ethics and Law 2 sections

See all topics

  1. Home
  2. Learn
  3. Data Leakage and Results That Are Too Good

🧭 Doing the Work · Section 021

🕵️ Data Leakage and Results That Are Too Good

A score that looks amazing is usually a bug, not a breakthrough. Here is how to hunt down the leak before someone else finds it.

Every lesson in this section is written by Pranay Mahendrakar.

11 of 11 lessons published · Three reading levels on every lesson

Start with “Your model scores 99%: what to suspect first”

Lessons in order

Work top to bottom. Each lesson assumes the one above it.

  1. 01 Your model scores 99%: what to suspect first
  2. 02 Target leakage: features that contain the answer
  3. 03 Duplicate rows across your splits
  4. 04 Fitting the scaler before splitting
  5. 05 Using the future to predict the past
  6. 06 The same person in train and test
  7. 07 Leakage that survives cross-validation
  8. 08 Choosing features on the full dataset
  9. 09 Overfitting your own test set
  10. 10 Did the model already see your test set?
  11. 11 Hunting a leak with ablations
Previous Reading Training Curves Next Reproducibility and Running Experiments

Learn AI

Learn Artificial Intelligence the easy way.

Learn. Build. Ask. Share.

Free forever. No sign-up, no ads, no tracking.

Learn

  • All topics
  • Learning paths
  • Projects
  • Practice playground
  • AI glossary
  • Error database
  • LeetCode solutions

Start here

  • Python for AI
  • Mathematics for AI
  • Machine Learning
  • Classic Algorithms in Depth
  • Linear Models and Regularisation
  • Ensembles and Gradient Boosting

This site

  • Search
  • New lessons feed
  • Sitemap
  • About Pranay Mahendrakar
  • pranaymahendrakar.com

© 2026 Pranay Mahendrakar. Written for people who are starting from zero.

10 new lessons every day. If something here is wrong or confusing, that is worth fixing — say so.