Assessing a model on data it was not fitted to, by splitting the sample repeatedly.Cross-validation is a family of techniques for estimating how well a statistical model will perform on new, unseen data. The core idea is to split the available data into separate parts: one part is used to train the model, and the other part is used to test it. This mimics the real-world situation where a model must make predictions on data it has never encountered, giving a more honest measure of its predictive power than simply re-testing on the training data.
The concept was introduced by Seymour Geisser in 1975, building on earlier work on data splitting and prediction.
The most common form is k-fold cross-validation. The data is randomly divided into k equal-sized folds. The model is trained on k−1 folds and tested on the remaining fold. This process is repeated k times, each time using a different fold as the test set. The final performance estimate is the average of the k test results. This uses all data for both training and testing, reducing the variance of the estimate compared to a single split.
It is used in machine learning to tune hyperparameters, select between competing models, and report realistic accuracy figures.
In leave-one-out cross-validation, a special case where k equals the number of data points, the model is trained on all but one point and tested on that single point, repeated for every point.







