What are Precision and Recall terminologies?

Vinay Chaudhari
2 min readDec 5, 2022
Image src : https://assets-global.website-files.com/5d7b77b063a9066d83e1209c/63528acc711181710f15d452_HERO_1_PRECISION.png

Precision and recall are two important concepts in the field of machine learning.

Precision refers to the percentage of correct results out of all the results that were returned by a model.

For example, let’s say you have a model that is trying to identify dogs in a group of animals. If the model returns 50 results and 40 of them are dogs, the precision of the model would be 80% (40 correct results out of 50 total results).

On the other hand,

Recall refers to the percentage of correct results out of all the items that the model should have identified.

For example, let’s say there are 100 animals in the group and 50 of them are dogs. If the model only identifies 40 of the dogs, the recall of the model would be 80% (40 correct results out of 50 total items).

In general, a good model will have high precision and recall. This means that it will return a lot of correct results and it will also identify most, if not all, of the items that it should identify.

here is a simple Python code example that shows how precision and recall can be calculated:

# define the number of correct results returned by the model
num_correct_results = 40

# define the total number of results returned by the model…

--

--

Vinay Chaudhari

Enthusiastic article writer and lifelong learner, passionate about documenting and exploring new ideas.