KFold divides available training data into k partitions, then trains and validates k model versions. Each fold uses a different partition for out-of-sample testing, while the remaining k−1 partitions provide training data. section 4.3
Use the resulting scores to make model evaluation more practical:
- Average the k scores to estimate expected performance on unseen data. section 4.3
- Use the scores’ standard deviation to quantify uncertainty in that estimate. section 4.3
- Choose k according to available data, training cost, distribution coverage, and evaluation purpose; k=5 balances precision and computation, while k=10 favors precise evaluation. section 4.3
Five-fold evaluation
With k=5, create five training and validation arrangements. Every row of the process validates on a distinct partition, and each model trains on the other four. Average the five results and report their standard deviation. section 4.3
Figure 4.9 How data is distributed between train and validation across the folds of a five-fold cross-validation strategy
A fold diagram makes the rotating validation partition and changing training composition immediately visible. section 4.3
