Thyroid precision and recall
Cross-tabulating the agreement between a binary score and a known label is a great way to understand how well the algorithm performs. Precision and recall are two further measures based on the table that give more insight into how well the score performs.
In this exercise, you'll explore precision and recall using the thyroid data. The binary_lof
and binary_iso
scores created in the previous exercises are available to use as columns in the thyroid
data. The code used to tabulate agreements in the previous exercise is also included.
Cet exercice fait partie du cours
Introduction to Anomaly Detection in R
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# 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 <- ___ / ___