Prevent data leakage in ML pipelines
Split-aware preprocessing, temporal boundaries, and feature provenance keeping offline gains real online.
Track: 📊 Data Science & Analytics · Domain: Modeling Practice · Level: advanced · ~35 min
Who this is for: Data Scientists, Analysts, Research Scientists, Product Analysts
When to Use This Skill
Split-aware preprocessing, temporal boundaries, and feature provenance keeping offline gains real online. Use it whenever a matching task appears in conversation — the agent loads these instructions on demand.
Steps
- Split temporally when production predicts the future
- Fit scalers/imputers/encoders inside folds only, never full data
- Ban features unavailable at prediction timestamp (audit with data team)
- Group correlated rows (same user/device) into same split side
- Track feature computation code versions with model artifacts
- Validate: offline-vs-online correlation checked each release
Common Pitfalls
- Random shuffles leaking user histories across train/test
- Target encoding fit on full dataset
Commands
Install with skills CLI
npx skills add aniruddhaadak80/skills --skill ml-modeling-leakage-prevention
Install globally
npx skills add aniruddhaadak80/skills --skill ml-modeling-leakage-prevention -g
Part of aniruddhaadak80/skills · Browse all at https://skills.sh/aniruddhaadak80/skills