首先,我使用Python 3.7并安装了PROC插件。我完全不懂Python编码。如果您能告诉我为生成ROC曲线写些什么,将深表感谢。
这是我的确切结果,
准确度= 0.41145393068469993
混淆矩阵:
['a''b''c''d''e']
[[353 168 80 112 245]
[190 302 20 352 75]
[245 96 300 47 278]
[129 350 20 412 49]
[66 129 75 59 580]]
精度:[0.35910478 0.28899522 0.60606061 0.41955193 0.47269764]
回想:[0.36847599 0.32161874 0.31055901 0.42916667 0.63806381]
F1得分:[0.36373004 0.30443548 0.41067762 0.42430484 0.54307116]
这里是我生成输出的示例代码,
print("Accuracy = "+str(accuracy))
# Showing the Confusion Matrix
print("\nConfusion Matrix:")
cm = confusion_matrix(testClass, testGuess, labels=classifier.classes_)
prec, rec, f1, tureSum= precision_recall_fscore_support(testClass, testGuess)
print(classifier.classes_)
print(cm)
print("Precision: ",prec)
print("Recall: ",rec)
print("F1 Score: ",f1)
print()