Accuracy_Score 中 sklearn 指标的问题[关闭]
machine-learning 485
原文标题 :Problem with sklearn metrics in Accuracy_Score [closed]
我在使用 sklearn 的指标时遇到问题。
我的数据集是 https://archive.ics.uci.edu/ml/datasets/cardiotocography
我试图像这样使用 SVM
svm_reg = svm.SVC(C = c, gamma = g)
svm_reg.fit(x_train, y_train)
svm_score=svm_reg.score(x_train, y_train)
y_pred = svm_reg.predict(x_test)
accuracy_score = accuracy_score(y_test, y_pred)
print("")
print(' C', c)
print(' Gamma', g)
print(" Score:", svm_score)
但是当我运行代码时,我遇到了这个问题
TypeError: 'numpy.float64' object is not callable
问题 :