甲状腺的精准率与召回率
交叉列联二元评分与已知标签的一致性,是了解算法表现的好方法。精准率与召回率是基于该列联表的两个指标,能进一步说明评分效果如何。
在本练习中,您将使用甲状腺数据来探索精准率与召回率。上一练习中创建的 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 <- ___ / ___