AI engineering glossary · ML fundamentals

What is k-fold cross-validation?

k-fold cross-validation (also called K-fold CV): The most common form of cross-validation. The data is divided into k equal folds; each fold takes one turn as the test portion while the other k-1 folds train the model. The k scores are averaged, and their spread hints at how stable the estimate is. Typical values of k are 5 or 10.

Level: beginnerTopic: ML fundamentals

k-fold cross-validation: an example

With k = 5 and 1,000 rows, each round trains on 800 rows and tests on 200, giving five scores.

Related terms

More ML fundamentals terms

Where you learn it

k-fold 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.