LearnThatStack Ace your next interview
Data Preparation & Feature Engineering · question
Question 1 of 58

What is data leakage, and why does it wreck an otherwise good model?

beginner
← All Data Preparation & Feature Engineering questions
Re-explain

Leakage means your training data contains information that would not exist at prediction time, or that quietly encodes the answer. The model learns that shortcut, because it is the easiest signal available.

The damage is that your offline numbers become fiction. Validation accuracy looks excellent, so you stop investigating and ship. In production the leaked column is empty, or it arrives after the decision, and performance collapses toward baseline.

It is hard to catch because nothing crashes. The code is correct; the data is wrong. A classic case is predicting fraud using a chargeback_filed column, when chargebacks only get filed after fraud is confirmed.

The cost is time and trust. Weeks of tuning on a leaked feature buy nothing, and business decisions get made on a number that was never true.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

The diagram below the answer is the concept . Jump to it ↓

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

Saved in this browser - sign in to keep your review list.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Interview lens

Likely follow-ups, what you can say, and the weak answers to avoid.

Sign in free to open it Free account - the lens opens as soon as you're back.

Want a quick review of the fundamentals? See the Data Preparation & Feature Engineering cheatsheet.

← Back to all Data Preparation & Feature Engineering questions
Pro · $10/mo

50 of 58 Data Preparation & Feature Engineering answers are in Pro.

Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.

  • Full answers + code
  • AI explanations, simpler or deeper
  • 1,000 AI credits / month
  • Cancel anytime