Precision and recall

Created
TagsMetrics

Precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances

  1. Precision = TP/(TP+FP)
  1. Among all the predictions, how many are truely predicted samples?
  1. Precision is used when there is a high cost associated with false positive.
  1. Prioritizing precision would make sure that anything we marked as moldy was definitely moldy.
  1. Maximizing precision would mark just one very moldy fruit.

Recall (also known as sensitivity) is the fraction of relevant instances that have been retrieved over the total amount of relevant instances.

  1. Recall = TP/(TP+FN)
  1. Among all the true samples, how many samples are predicted?
  1. Recall is used when there is a high cost associated with false negative.
  1. You want to be very careful to avoid moldy fruit (positive class) going out in a shipment. Of the actually moldy fruit, we want to catch as much as we can, so it makes sense to prioritize the recall.
  1. If we maximized recall, we would mark everything positive so that we don’t miss any moldy fruit.

If you increase precision, it will reduce recall, and vice versa. F-beta score can adjust the weight of precision and recall. You can change the beta value to less than 1 to prioritize precision or to greater than 1 to prioritize recall.