EasyDeepLearn

What is target leakage and how do you prevent it?

medium

Answer

  • Target leakage is when a feature contains information about the label that would not be available at prediction time (e.g., using post-outcome features, or fitting a scaler/encoder on the full dataset before splitting).
  • Prevent it by fitting all transformations only on the training fold (use pipelines), splitting temporally when time matters, and reviewing features for future information.
Check yourself — multiple choice
  • It's when the model is too small
  • It's when features leak information from the label or the future
  • It's the same as underfitting
  • It only happens in deep learning

Leakage = using information at train time that won't be available at inference time.

#data-quality#features

Practise Supervised Learning

215 interview questions in this topic.

Related questions