Classical ML, validation, metrics, interpretation, debugging · insight-0158
Report a tuned model's performance from nested cross-validation, not from the search's best score
- Evidence type
- documented fact
- Difficulty
- medium
- Roles
- Data scientist, ML engineer
- Industries
- healthcare, cross-industry
Summary: situation, action, reason, boundary
Situation
You quote GridSearchCV.best_score_ (or the best of many experiments) as the expected production performance.
Action
Wrap the search in an outer cross-validation loop (or evaluate the selected configuration once on an untouched test set) and report the outer score.
Reason
Selection is part of the procedure being evaluated; only data unseen by the selection can estimate its performance honestly.
Boundary
Hyperparameter search, model-family comparison, feature-set choice, especially on small or noisy datasets.
Symptom or risk
The best score of many configurations is optimistically biased because the same folds chose and scored the winner.
Exceptions
With large data and a held-out test set used once, nested CV adds little beyond cost.
Trade-offs
Nested CV multiplies compute by the number of outer folds and reports the procedure, not one fixed model.
Pitfalls
Expecting nested CV to output the final model; refit the search on all training data afterwards.
Lessons and concepts
Claims and their sources
Non-nested CV tunes and evaluates on the same data and is optimistically biased; nested CV separates selection from assessment.
Using cross-validation to both tune and estimate error yields biased error estimates; nested CV gives nearly unbiased estimates.