Bootstrap

ValueError: n_splits=4 cannot be greater than the number of members in each class

使用sklearn中cross_val_score()函数进行K折交叉验证时遇到以下bug:

ValueError: n_splits=4 cannot be greater than the number of members in each class

错误的原因:设置的折数大于每个类的样本数。
目前没解决:
自己两个程序里面用的准确率评估一样,pso+q可以使用,pso原始的方法用不了。

;