Cross-validation estimates model performance by repeatedly training on most data partitions and testing on the remaining partition. Aggregating the results produces a cross-validated score while keeping each test partition outside that training run, reducing information leakage and unconscious optimization. section 8.2.1
Use a cross-validation ticket or evaluation checklist to:
- Divide the dataset into disjoint partitions, such as ten folds. section 8.2.1
- Train a separate model for each fold, holding that fold out for testing and using the others for training. section 8.2.1
- Aggregate the fold-level results and compare relevant measures rather than relying on accuracy alone. section 8.2.1 section 8.6
- Record the computational trade-off: cross-validation suits simple models and small or sparse datasets but becomes expensive for complex models and large datasets. section 8.2.1
Table 8.1 Generating a cross-validation set (view table figure)
| P1 |
P2 |
P3 |
P4 |
P5 |
P6 |
P7 |
P8 |
|
|---|---|---|---|---|---|---|---|---|
| Set 1 |
Test |
Train |
Train |
Train |
Train |
Train |
Train |
Train |
| Set 2 |
Train |
Test |
Train |
Train |
Train |
Train |
Train |
Train |
| Set 3 |
Train |
Train |
Test |
Train |
Train |
Train |
Train |
Train |
| Set 4 |
Train |
Train |
Train |
Test |
Train |
Train |
Train |
Train |
| Set 5 |
Train |
Train |
Train |
Train |
Test |
Train |
Train |
Train |
| Set 6 |
Train |
Train |
Train |
Train |
Train |
Test |
Train |
Train |
| Set 7 |
Train |
Train |
Train |
Train |
Train |
Train |
Test |
Train |
| Set 8 |
Train |
Train |
Train |
Train |
Train |
Train |
Train |
Test |
Use the fold matrix to verify that each partition serves as the test set once while the remaining partitions serve as training data. section 8.2.1











