我被sklearn车型选择的列车测试分割所困扰

2024-04-26 18:21:27 发布

您现在位置:Python中文网/ 问答频道 /正文

from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(image_data, labels, test_size = 0.2, random_state = 101)

显示错误:

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


Tags: thefromtestimageimportdatasizelabels