樣本全集:TP+FP+FN+TN3d
TP:樣本爲正,預測結果爲正blog
FP:樣本爲負,預測結果爲正ci
TN:樣本爲負,預測結果爲負io
FN:樣本爲正,預測結果爲負im
準確率(accuracy):(TP+TN)/ (TP+TN+FP+FN)call
精準率(precision):TP/(TP+FP),正確預測爲正佔所有預測爲正的比例db
召回率(recall):TP/(TP+FN),正確預測爲正佔所有正樣本的比例img
假定手上60個正樣本、40個負樣本,系統查找了50正樣本(TP+FP),其中40個是正樣本。co
即:ps
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