使用方法:
# 导入方式
from sklearn.model_selection import KFold
KFold(n_split, random_state, shuffle)
参数:
- n_split:需要划分多少折数
- shuffle:是否进行数据打乱
- random_state:随机数
skf = KFold(n_splits=10, random_state=233, shuffle=True)
使用方法:
# 导入方式
from sklearn.model_selection import KFold
KFold(n_split, random_state, shuffle)
参数:
skf = KFold(n_splits=10, random_state=233, shuffle=True)