Quiz
Cross-Validation Leakage and Regularization
Identify the subtle data-leakage mistake that inflates cross-validated performance when tuning a regularized model.
You are tuning the L2 penalty of a ridge regression on a small dataset. Your pipeline: (1) standardize all features using the full dataset's mean/std, (2) select the top-k features by correlation with the target on the full dataset, (3) run 10-fold CV to pick the penalty λ. CV reports excellent generalization, but the deployed model performs far worse. What is the primary methodological flaw?