SOARDO
AI / ML Engineermlintermediate3 interactive MCQs in app

Data leakage

target leakage vs train-test contaminationPipeline fit inside CV foldsSMOTE/feature-selection before split error

Data leakage happens when information from outside the training distribution—from future events or from the validation/test split—sneaks into training features or preprocessing, inflating offline scores while failing in production. Two main forms exist: (1) Target leakage: a feature captured after or derived from the target (e.g. "hospital_discharge_summary" predicting ICU admission), and (2) Train-test contamination: running scaling, imputation, SMOTE oversampling, or feature selection across the full dataset before splitting.

always put scalers, TF-IDF vectorizers, and feature selectors inside a Pipeline and fit them inside each CV fold separately.
checking feature importance and celebrating a 0.99 AUC feature that only exists after the event you want to predict.
Data leakage — Core Readingread ↗Google ML Crash Courseread ↗Kaggle Learn Micro-Coursespractice ↗

Practice Data leakage with 3 graded MCQs & written feedback.

Take SOARDO’s free 12-question diagnostic to see how strong you are across your target role and unlock adaptive daily missions.

Test yourself free on SOARDO →View full AI / ML Engineer roadmap

More AI / ML Engineer Study Guides