A cross-validation fold is one partition of a training dataset used either to train or validate a model. In k-fold cross-validation, the data is divided into k folds; each model trains on k−1 folds and validates on the remaining fold. Averaging validation performance across runs estimates generalization while reducing dependence on one random split. section 3.3.3
A practical evaluation workflow is:
- Choose k and split only the training data into folds. section 3.3.3
- Train and validate k models, rotating the held-out fold. section 3.3.3
- Average validation metrics, select a model, retrain on the full training set, and evaluate once on the held-out test set. section 3.3.3
- Avoid naive random splits when near-identical molecular analogs could appear in both folds, making scores look overly optimistic. section 3.3.3
Five-fold evaluation
With scikit-learn, cross_validate(..., cv=5) trains five models and can report accuracy, precision, recall, and F1 for each fold.
