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))