报错看不懂
import numpy as np
import pandas as pd
from sklearn import metrics
from sklearn.svm import SVC
line12#
def classfy(x,y,te_x,te_y):
clf = SVC(kernel='rbf',C=1,gamma=0.005,class_weight='balanced')
# clf = SVC(kernel='linear', C=1.0, class_weight={1: 20},verbose=True)
model = clf.fit(x, y)
pre = model.predict(te_x)
sv=model.support_
ac = metrics.accuracy_score(te_y, pre)
auc=metrics.roc_auc_score(te_y, pre)
f1 = metrics.f1_score(te_y, pre)
return sv,auc,model
报错信息:
File "D:\anaconda1\lib\site-packages\scipy\stats\morestats.py", line 12, in <module>
from numpy.testing.decorators import setastest
ModuleNotFoundError: No module named 'numpy.testing.decorators'
疑惑:在程序中line12无代码,却显示line12报错。有大神看懂是什么问题嘛,以及如何解决的方法