Cross-validation

Cross-validation splits the training data into k folds: the model is trained k times, each fold serving in turn as validation. The mean and spread of the scores give a more stable estimate of performance than a single split, at the cost of multiplied computation time.

Example

cross_val_score(modele, X, y, cv=5)

Related concepts

The whole glossary