Why a single split is not enough
One held-out validation set is a noisy estimator of model quality. With small or imbalanced data, the noise can be larger than the difference between models you are trying to choose between. K-fold cross-validation averages over multiple splits so the comparison is honest.
Three flavors that matter
- StratifiedKFold — preserves class proportions per fold for classification.
- GroupKFold — keeps all rows of one group (user, session, patient) inside the same fold.
- TimeSeriesSplit — train on the past, validate on the future, never the other way.
Reading CV scores honestly
Always report the mean and the standard deviation across folds. If the std is half the gap between two candidate models, the comparison is noise. Increase folds, average over multiple seeds, or admit you cannot tell them apart yet.