What does scores contain?
scores = cross_val_score(model, X, y, cv=5)
- 5 scores, one per held-out fold
- 1 score, the average of all 5 runs
- 5 trained models for reuse
- A 5x5 confusion matrix
Each fold is held out once while the model trains on the rest, yielding one score per fold.
Play AI & ML ▸