AI engineering glossary · ML fundamentals
What is nested cross-validation?
Nested cross-validation: A two-level cross-validation: an inner loop tunes hyperparameters and an outer loop measures performance of the whole tuning-plus-training procedure on data the tuning never touched. It avoids the optimistic estimate that arises when the same folds are used both to pick settings and to report the score.
Nested cross-validation: an example
An outer 5-fold loop tests each model, while inside every outer training part a 3-fold loop chooses the best regularisation strength.
Related terms
More ML fundamentals terms
- No free lunch theorem
- Noise
- Non-parametric model
- Occam's razor
- Online learning
- Out-of-distribution
- Outlier
- Overfitting
Where you learn it
Nested cross-validation is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.