Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

https://scikit-learn.org/dev/modules/cross_validation.html#cross-validation-iterators-with-stratification-based-on-class-labels

Some classification problems can exhibit a large imbalance in the distribution of the target classes: for instance there could be several times more negative samples than positive samples. In such cases it is recommended to use stratified sampling as implemented in StratifiedKFold and StratifiedShuffleSplit to ensure that relative class frequencies is approximately preserved in each train and validation fold.

评论