EvolutionCourse Hub
← Dictionary
Stratified k-fold

Also: StratifiedKFold

Evaluation

Cross-validation in which every fold keeps the same share of each class as the whole training set, so no fold is accidentally easy or hard.

ExampleEach churn fold keeps 26.5% leavers; StratifiedKFold(5, shuffle=True, random_state=42).