Cross-Validation and Model Selection Bias
Compare fold estimates computed for a fixed pipeline with nested evaluation after a hyperparameter search.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Each fold is held out once
Partition the observations into \(k\) folds, respecting groups or time restrictions. Fit a fresh pipeline on the other folds and evaluate on the held-out fold. Aggregate the scores using sample weighting appropriate to the metric. A single estimator’s fold results can be correlated because training sets overlap. Treat the estimate as evidence under the split design, not as \(k\) independent experiments.
Selection creates a second evaluation requirement
Choosing the best of many configurations on those folds can exploit fluctuations in their scores. To estimate the effect of the whole selection procedure, choose hyperparameters in inner splits and measure the result on outer held-out data. A separate final test is another design. Evaluation leakage covers transforms fitted before a split. Bias and variance explain why fold size and model instability affect observed scores.[1][2]