我正在尝试获得分类器的准确度分数,但我不断收到此错误
类型错误:预测()缺少 1 个必需的位置参数:'X'
任何人都可以帮忙吗?
from sklearn.metrics import accuracy_score
classifiers = [SVC, sgd, naive_bayes]
# for each classifier get the accuracy score
scores = [accuracy_score(clf.predict(test_X), test_y) for clf in classifiers]
index = np.argmax(scores)
print(scores)
print(classifiers[index])
print(scores[index])