【问题标题】:How to get the graph between false acceptance rate and false rejection rate for the mnist dataset in python code如何在python代码中获取mnist数据集的错误接受率和错误拒绝率之间的图表
【发布时间】:2020-02-26 06:16:39
【问题描述】:

我需要找到我为 mnist 数字分类得到的这个 10*10 混淆矩阵的错误接受率和错误拒绝率,然后我需要在它们之间绘制图表。 这是我的混淆矩阵代码:

test_predictions = model.predict_classes(test_images)

from sklearn.metrics import confusion_matrix

cm = confusion_matrix(y_true = test_labels, y_pred = test_predictions)
print(cm)

【问题讨论】:

  • 错误接受率和错误拒绝率对二元分类有意义。

标签: python machine-learning deep-learning confusion-matrix


【解决方案1】:

您可以使用sklearn.metrics.plot_confusion_matrix 中的here

from sklearn.metrics import plot_confusion_matrix
plot_confusion_matrix(estimator=model, X=test_images, y=test_labels)

【讨论】:

    猜你喜欢
    • 2021-10-04
    • 1970-01-01
    • 1970-01-01
    • 2015-06-20
    • 2014-08-12
    • 2015-08-10
    • 2017-04-13
    • 1970-01-01
    • 2023-03-31
    相关资源
    最近更新 更多