简体   繁体   中英

How to split a dataset into 5 subsets of the same size?

is there a simple way to divide a dataset into 5 subsets of the same size? Also taking into account the percentage of class distribution? It should be possible to access each subset directly.

Many thanks

Are you talking about Kfold? scikit-learn StratifiedKFold is a variation of KFold. The folds are made by preserving the percentage of samples for each class.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM