Skip to content

k-fold Cross Validation

Definition

The dataset is partitioned into k disjoint sets called folds. The training set are the k-1 folds, while the test is the last fold.

We use all possible combinations, ie each fold will be used as a test set once.

The advantage of k-fold CV is that the resulting k performance estimates are largely independent of each other, only dependent on the fact theres a slight dependency introduced between training sets.

There is also a little bit of bias introduced since we're not testing on the entire training set, rather we're testing on \(n- (\frac{n}{k})\) of the training set.

The disadvantage of k-fold CV is that \(k\) dictates the number of train-test splits we create and the size of the train and test data.

A common choice for k-fold CV is to choose \(k=10\)

References

Cross Validation