这是我的代码
X_train , X_test, y_train, y_test = train_test_split(X, y, test_size=0.4, random_state=101)
这是我得到了什么
ValueError: Found input variables with inconsistent numbers of samples: [7, 5000]
我不知道发生了什么事,我试着把它运行一遍又一遍,结果就这样了
你的矩阵是什么形状的?看起来,那 X
和 y
有不同的长度。检查它与 print(X.shape, y.shape)