Precision & Recall

Sreekanth
3 min readJan 7, 2022

--

Precision & recall are often used in information retrieval problems. Which is used measure the performance of a modal.

Suppose we have a confusion matrix of binary class labels as below:

  1. Precision(pr): All the +ve points that are predicted/declared by the trained model. On the all +ve predicted points what percentage (%) of them are truly positive.

Precision (pr):

TP: True positive points, Here actual label is 1. and the Predicted class label is also 1. So both class labels are the same.

FP: False positive points,Here actual label is 0. But predicted as 1. So both class labels the are same.

Note: In normal words, we can say, data points for which classes labels are correctly predicted / (data points for which class labels are correctly predicted + data points for which actual class labels as 0 but predicted as 1).

2. Recall: All the original points that are actually from the +ve class. How many of them are predicted to be +ve.

TP: True positive points, for which actual class label(1)and predicted class label(1) is the same.

FN: False negative points, Here the actual class label is (1), and the predicted class label is (0).

TP + FN: True positive points + False negative points

Note: Finally we can say, Data points for which actual and predicted class label is same (here (1, 1) as TP)/(Datapoints for which actual class label is 1 and predicted as 0 (here (1,0) as FN)+ Data points for which predicted and actual class label is 1 (here (1,1) as TP))

3. Combine Precision & Recall to measure performance of the modal:

precision: pr

Recall : re

Hereby using a combination of precision and recall, we can also measure the performance of a modal.

--

--

Sreekanth

I m an engineer try to go through new technologies