In five-fold cross-validation, the records are divided into five folds. The model is trained five times, each time on four folds and tested on the fifth, and the five scores are averaged. The spread between the scores shows how much a result depends on which records happen to land in the test.
CUBIG’s UCI Polish Companies Bankruptcy write-up (October 2026), for example, reports a single split rather than repeated folds and notes that repeated and time-based evaluation would be needed to assess stability and future use.
Common variants:
- k-fold: the data is split into k folds of roughly equal size, often five or ten
- stratified k-fold: each fold keeps about the same class proportions as the full dataset, which matters when one outcome is rare
- time-series split: each test fold comes after its training data in time, so the model never learns from later records than the ones it is tested on
- group k-fold: all records from the same customer, patient or site stay in the same fold
How is cross-validation different from a holdout set?
- A holdout set is one fixed split. A holdout result is simple to produce and stays independent of training, but it depends on which records landed in the split.
- Cross-validation rotates the split and averages the scores, so it uses the data more fully and shows how stable a result is across different test portions.
- Teams often combine the two: cross-validation for development choices, and a final evaluation set that none of those choices touched.
Where does cross-validation break in AI work?
A team runs ten-fold cross-validation on transaction records and reports a strong average. The folds were drawn at random, so records from the same customer, and from later months, appear on both sides of most splits. Part of the average measures how well the model recognizes customers and periods it has already seen, so it overstates performance on new customers and later months.
Cross-validation gives a fair estimate only when the folds respect how the data is grouped and ordered, and when every preparation step is fitted inside each training fold, which is a data leakage question as well. For data with a time order, a time-series split is the variant that tests the model on records from after its training period.