样本全集:TP+FP+FN+TN
TP:样本为正,预测结果为正
FP:样本为负,预测结果为正
TN:样本为负,预测结果为负
FN:样本为正,预测结果为负
准确率(accuracy):(TP+TN)/ (TP+TN+FP+FN)
精准率(precision):TP/(TP+FP),正确预测为正占全部预测为正的比例
召回率(recall):TP/(TP+FN),正确预测为正占全部正样本的比例
假定手上60个正样本、40个负样本,系统查找了50正样本(TP+FP),其中40个是正样本。
即:
TP = 40
TP + FP = 50 ,即FP = 10
FN = 60 - 40 = 20
TN = 40 - 10 = 30
准确率(accuracy) = (TP+TN)/ (TP + TN + FP + FN) = (40 + 30)/ 100 = 70%
精确率(precision) = TP / (TP + FP) = 40 / (40 + 10) = 80 %
召回率(recall) = TP / (TP+FN) = 40 / (40 + 20) = 2/3