Concepts

Cross-validation

Quick explainer2 min readBeginner

Cross-validation checks how well a model will do on new data by testing it on parts of the data it did not train on, several times over.

In plain words

A model can look great on the examples it learned from and still fail on new ones. Cross-validation keeps some data aside, tests the model on it, then repeats with a different part held back each time. Averaging the rounds gives a fairer score than one lucky split.

A quick example

You have 120 examples and pick k = 4. Shuffle them and split them into 4 groups of 30. Train on 90 and test on the other 30, four times, so every group is the test set once. Then report the average and the spread of the four scores.

Where you'll meet it

  • Comparing two models fairly before choosing one.
  • Judging a model when there is too little data to set a large test set aside.

Related

Sources

  1. Docsk-fold cross validation, Google Machine Learning Glossary · read 29 Sept 2026
  2. DocsCross-validation: evaluating estimator performance, scikit-learn · read 29 Sept 2026

Checked by WhatIsAI against the sources above · 29 Sept 2026. Spotted an error? Report it.