问题:Traceback (most recent call last): File “D:/xiangmu/python/test/test1.py“, line 100, in <module

问题:2020-8-25

Traceback (most recent call last): File
“D:/xiangmu/python/test/test1.py”, line 100, in
logistic_train(train_vecs, y_train,test_vecs , y_test) File “D:/xiangmu/python/test/test1.py”, line 48, in logistic_train
print(“Logisitic评分:”, regr.score(test_vecs, y_test)) File “D:\anaconda3\lib\site-packages\sklearn\base.py”, line 369, in
score
return accuracy_score(y, self.predict(X), sample_weight=sample_weight) File
“D:\anaconda3\lib\site-packages\sklearn\linear_model_base.py”,
line 293, in predict
scores = self.decision_function(X) File “D:\anaconda3\lib\site-packages\sklearn\linear_model_base.py”,
line 273, in decision_function
% (X.shape[1], n_features)) ValueError: X has 50 features per sample; expecting 70

向量设置的太小

©️2020 CSDN 皮肤主题: 数字50 设计师:CSDN官方博客 返回首页