What are the common cross-validation techniques?
Answer
Cross-validation is a statistical method used to evaluate the performance and generalizability of a model by rotating which part of the data serves as the validation set, so every sample is used for both training and validation. The most common technique is k-Fold Cross-Validation: the data is divided into equal folds, the model is trained
times, each time on
folds with the remaining fold held out, and the final score is the average over all
runs. Leave-One-Out Cross-Validation (LOOCV) is the special case where
equals the number of data points. Stratified k-Fold preserves the class distribution inside every fold, which matters for imbalanced datasets. Time Series Cross-Validation builds folds that respect temporal order, preventing future data from leaking into training.
(1) Core Idea: Rotate the validation fold and average the scores, giving a more reliable estimate than a single train/validation split.
(2) Choosing The Variant: or
is the default, LOOCV suits tiny datasets, stratified folds suit class imbalance, and TSCV is mandatory for sequential data.
(3) Why It Matters: Every sample gets validated on, so the estimate has lower variance and uses all the data, at the cost of training times.

Figure 1: Four cross-validation schemes. Orange blocks are validation folds: they rotate (k-fold), shrink to one sample (LOOCV), keep class ratios (stratified), or move forward in time (TSCV).
Mathematical Formulation:
Where:
is the cross-validation score, the average error across all
folds.
is the validation error on fold
, and
indexes the folds.
is the model trained on all folds except fold
, and
is the held-out fold.
is the evaluation loss or metric (e.g., error rate, log-loss).
Leave a Reply