Precision and Recall Evaluation Metrics in Machine Learning
Precision and Recall are two best known and most misunderstood evaluation metrics in machine learning. In this article we are going to discuss the simplest way in which we can understand them with an example.
Consider that we were playing a simple game online. The rules of the game are pretty simple, you will have to shoot the space ships of the opposition constantly, until you see a survivor space ship coming toward you.
Now let’s consider that your model was playing the game from a long time and have collected a lot of related data.
Data points that we collected belonged to these 3 categories.
Total time you Stopped shooting: x
Total time you Stopped shooting with survivor ship ahead you: y
Total time you Stopped shooting with Opposition Space ship ahead you: z
Now, we created a Venn diagram to explain the occurrences.
Precision
Precision is the value which gives the value of number of times you took the correct action of all the times you took an action.
So, precision is given by the intersection divided by the blue part of the Venn diagram. i.e.
Recall
Recall is the value which gives the value of all the times you were supposed to take an action of all the times you took an action.
So, Recall is given by the intersection divided by the orange part of the Venn diagram.
More detailed discussion of precision and recall are done in the evaluation metric post.
How to choose a good evaluation metric for your Machine learning model
#machinelearning
#datascience
#python
February 20, 2020
18 mins read