成功解决ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be

成功解决ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.


解决问题

ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.

解决思路

值错误:当n_samples=0, test_size=0.3和train_size=None时,得到的train 集将为空

解决方法

arrays参数设置不对,详见参考文章。

参考文章:Python之 sklearn:sklearn中的train_test_split函数的简介及使用方法之详细攻略

(0)

相关推荐