ValueError: Cannot have number of splits n_splits=3 greater than the number of samples: 1

If the number of splits is greater than number of samples, you will get the first error.

如果划分类别数比样本数还多,就会报这个错误。

因此,检查一下数据是否读取正确。

发布了38 篇原创文章 · 获赞 98 · 访问量 36万+

猜你喜欢

转载自blog.csdn.net/xijuezhu8128/article/details/87861726