混淆矩陣(confusion matrix)相關指標

真陽(比)率(True Positive Rate, TPR) - 我們所關心的事件(陽性),被正確預測出的比例

同義詞:敏感度(sensitivity)、召回率(positive recall、recall)

真陽率=敏感度=召回率= TP / (TP + FN). #TP: True Positive真陽, FN: false Negative假陰

假陰(比)率(False Negative Rate, FNR) - 陽性事件中,被錯誤預測為陰性的比例:

假陰率=1-真陽率=1-(TP / (TP + FN)) = FN / (TP + FN)

真陰(比)率(True Negative Rate, TNR- 陰性事件中被正確預測出的比例

同義詞:特異性(specificity)、陰性召回率(negative recall)

特異性 = TN / (TN + FP ) #TN: True Negative真陰, FP: False Positive假陽

假陽(比)率(False Positive Rate, FPR) - 陰性事件被錯誤預測為陽性的比例

假陽率 = 1- (TN / ( TN + FP )) = FP / (TN + FP)

從觀測面向轉預測面向

精確度(precision) - 預測為陽性事件中正卻的比例、陽性率預測值(Positive Predictive Value, PPV)

精確度 = PPV = TP / ( TP + FP )

陰性率預測值(Negative Predictive Value, NPV) - 類別分布平衡情況下,預測為陰性的正確比例

NPV = TN / (TN + FN)

偵測率(detection rate) - 所有樣本中,陽性被確偵測出來的比例

DR = TP / ( TP + FN + TN + FP )

普遍率(prevalence) - 該類樣本佔樣本總數的比例,以陽性為例,所有樣本中陽性事件比例為實際陽性事件普遍率

普遍率 = (TP + FN) / (TP + FN + FP + TN) 

偵測普遍率(detection prevalence) - 所有樣本中預測為陽性的比例,普遍與偵測普遍率都大於偵測率

偵測普遍率 (TP + FP) / (TP + FN + FP + TN)

F量測(F-measure) - 在類別等權重假設下,精確度與召回率兩者的調和平均數

F量測 = 2TP / ( 2TP + FP + FN )


參考資料

鄒慶士,大數據分析與應用實戰,2020

這個網誌中的熱門文章

取消Excel與word網際網路與網路路徑超連結自動格式

Installing VMware workstation pro on Ubuntu 22.X (Jammy Jellyfish)