我试图将正在处理的数据拆分为训练集和测试集,但在使用train_test_split函数时,我得到的错误是n_samples=0
这是我的密码:
X_train, X_test, y_train, y_test = model_selection.train_test_split(summary, labels, test_size=0.35)
摘要和标签是列表,将它们转换为数组后,我得到的形状是:
(1248,)
(1248,)
它们都有1248个值。有人能告诉我为什么它不工作吗?谢谢
错误消息:
With n_samples=0, test_size=0.35 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters
适用于我,请检查此选项是否适用于您:
使用字符串列表进行测试
相关问题 更多 >
编程相关推荐