甲狀腺的 precision 與 recall
交叉列聯二元分數與已知標籤的一致性,是了解演算法表現的好方法。Precision 與 recall 是基於此表的兩個進一步指標,能更深入說明分數的效能。
在這個練習中,你會用甲狀腺資料來探索 precision 與 recall。前面練習已建立的 binary_lof 與 binary_iso 分數,已作為欄位加入 thyroid 資料中可供使用。上一題用來彙整一致性的程式碼也已包含在內。
本練習屬於課程
R 中的異常偵測入門
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Tabulation for the binary isolation score
table(thyroid$label, thyroid$binary_iso)
# Precision for the isolation scores
precision_iso <- ___ / ___
# Tabulation for the binary lof score
table(thyroid$label, thyroid$binary_lof)
# Precision for the binary lof score
precision_lof <- ___ / ___