Why should resampling happen only at fit time and not at prediction time in an ML pipeline?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
Overview: Explain why undersampling, oversampling and SMOTE belong only in the training step of an ML pipeline. Tests understanding of samplers versus row-wise transformers, leakage in cross-validation, distorted test metrics on imbalanced data, and how resampling shifts predicted probabilities.