Build smart cross validation plans for any dataset. See fold ranges, leftovers, and sample balance. Improve evaluation confidence before training expensive machine learning systems.
This example uses 120 total samples, 10% holdout testing, and 5 folds.
| Fold | Validation Samples | Training Samples | Cross Validation Pool | Holdout Test Samples |
|---|---|---|---|---|
| 1 | 22 | 86 | 108 | 12 |
| 2 | 22 | 86 | 108 | 12 |
| 3 | 22 | 86 | 108 | 12 |
| 4 | 21 | 87 | 108 | 12 |
| 5 | 21 | 87 | 108 | 12 |
Because 108 ÷ 5 = 21 remainder 3, three folds receive one extra validation sample.
1) Holdout test set: If you choose a test split, the calculator removes those samples first.
CV Samples = Total Samples − Test Samples
2) Base validation size: Each fold receives the integer part of the remaining pool divided by k.
Base Fold Size = floor(CV Samples / k)
3) Leftover samples: Any remainder is distributed to early or late folds, depending on your selected placement rule.
Remainder = CV Samples mod k
4) Training size for each fold: The training set uses every cross validation sample except the current fold’s validation block.
Training Samples per Fold = CV Samples − Validation Samples in Fold
5) Reuse count: Every cross validation sample appears in training exactly k − 1 times across the full cycle.
It divides a dataset into k validation groups. Each group is used once for validation, while the remaining groups are used for training.
A holdout test set gives you one final untouched benchmark after cross validation finishes. It helps reveal whether tuning choices generalized well.
Common choices are 5 or 10. Smaller values train faster, while larger values often reduce bias but increase runtime and repeated fitting cost.
Enable shuffling when sample order may contain patterns, such as sorted classes, timestamps, or grouped observations. It usually creates more balanced folds.
A seed makes shuffled results repeatable. That helps debugging, reporting, and collaboration because everyone can regenerate the same folds later.
The leftover samples become the remainder. This calculator places them in early or late folds, depending on your selected distribution rule.
No. It computes standard fold sizes and sample assignment previews. Stratified splitting needs class distribution data for every sample.
Yes, but use care. If the dataset is tiny, each fold becomes unstable, and model estimates may vary sharply across validations.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.