code_2.py 211 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3
print("SVM预测准确率:: {:.2f}%".format(svm.score(X_test, y_test)*100))
print("SVM预测F1分数: {:.2f}%".format(f1_score(y_test, y_pred)*100))
print('SVM混淆矩阵:\n', confusion_matrix(y_pred, y_test))