Skip to main content
. 2021 Aug 12;2(9):100329. doi: 10.1016/j.patter.2021.100329

Figure 2.

Figure 2

Schematic display of nested 5-fold stratified cross-validation

A set of n observations is randomly split into five non-overlapping groups in the outer loop. Each group contains approximately the same percentage of samples of each target class as the complete set (stratification). In the inner loop, each training fold is divided again for another round of cross-validation (k = 3) to determine optimal hyperparameters for the classifier.