Which cell counts missed alarms?

A confusion matrix cross-tabulates true and predicted labels. In scikit-learn, rows hold the truth and columns the prediction.

confusion_matrix in practice

If three of twenty faulty parts pass inspection, enter three in the faulty-row, good-column cell. Fix the label order before interpreting the diagonal.

中文

混淆矩阵里,哪一格是漏报?

混淆矩阵按真实类别与预测类别交叉计数。在 scikit-learn 中,行是真值,列是预测。

confusion_matrix 应用实例

检测器把 20 件坏件中的 3 件判为合格,就在“真实坏、预测好”处填 3。先固定标签顺序再读对角线,否则容易把漏报看成误报。

References / 参考来源

Keep reading / 继续阅读