【模型评估】混淆矩阵(Confusion matrix)及其指标
本文引用网址:
http://bluewhale.cc/2016-05-26/confusion-matrix.html 转自“蓝鲸网站分析博客”
https://en.wikipedia.org/wiki/Confusion_matrix 维基百科
混淆矩阵是对有监督学习分类算法准确率进行评估的工具。通过将模型预测的数据与测试数据进行对比,使用各种指标对模型的分类效果进行度量。
true conditon 真实值
predicted condition 预测值
重要指标
precision , positive predictive value (PPV)
PPV = TP / (TP+FP)
recall , sensitivity , true positive rate (TPR)
TPR = TP / (TP+FN)
F1 score
F1=2 * (PPVTPR) / (PPV+TPR)
=2TP / (2TP+FP+FN)