在切分数据集时提示:ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2.
ValueError:y中填充最少的类只有1个成员,这太少了。任何类别的最小组数不能少于2个
检查数据集发现最小的分类只有1个

解决方法:删掉最小的分类或者填充一个数据
本文探讨了在数据集切分过程中遇到的ValueError问题,即最小类别仅包含一个样本。解决方法包括删除该类别或增加合成数据,以确保类别平衡。
在切分数据集时提示:ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2.
ValueError:y中填充最少的类只有1个成员,这太少了。任何类别的最小组数不能少于2个
检查数据集发现最小的分类只有1个

解决方法:删掉最小的分类或者填充一个数据
1690
2624
5571
1399
1万+