StratifiedKFold用法类似Kfold,但是他是分层采样,确保训练集,测试集中各类别样本的比例与原始数据集中相同。
例子:
import numpy as np
from sklearn.model_selection import KFold,StratifiedKFold
---------------------
作者:wqh_jingsong
来源:CSDN
原文:https://blog.csdn.net/wqh_jingsong/article/details/77896449