SpinTheMic
Pro

Interview practice question

Scaling done before the split

Machine Learning · Feature Engineering · Beginner

You notice a notebook scales the entire dataset before splitting into train and test. Why does it matter, and how do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Test data statistics influence training preprocessing.
  • Mild leakage; evaluation slightly optimistic.
  • Worse for target encoding or feature selection.
  • Split first; fit transformers on training only.
  • Use pipelines to enforce it.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics