What is Precision and recall?
Evaluation metrics for two-class classification models. Precision is the fraction of items predicted positive that are actually positive, TP ÷ (TP + FP), and recall is the fraction of actually positive items that were predicted positive, TP ÷ (TP + FN). In general, changing the decision threshold raises one and lowers the other. Their harmonic mean, 2PR ÷ (P + R), is called the F1 score.
Japanese name: 適合率と再現率
Precision and recall appears in 3 practice questions across 1 topic, including Machine Learning Basics.
Field: Machine Learning Basics
Which one to emphasize
In disease screening and defect detection, where a miss is costly, recall is emphasized. When wrongly calling something positive is costly, as in a spam filter that might quarantine an important email, precision is emphasized. Depending on the purpose, the Fβ score, which weights the two differently, may also be used. For imbalanced data with very few positives, these metrics describe performance better than accuracy.
FAQ
How do they differ from accuracy?
Accuracy is the fraction of all predictions that are correct, (TP + TN) ÷ total. On data in which only 1% of items are positive, predicting everything as negative already gives 99% accuracy, but recall is 0, which shows that no positives are found at all.
Are accuracy and precision the same thing?
No. In everyday language the two words are often used loosely, but in classification accuracy is the fraction of all predictions that are correct, while precision is the fraction of positive predictions that are correct. In measurement, precision has yet another meaning: how closely repeated measurements agree with each other.