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.

Level: advancedTopic: ML fundamentals

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.