In order to understand Precision and Recall, we will take a very simple example. Suppose we are asked to recall certain events from past. For the sake of simplicity, let us take that there are 20 very significant events in our life which we're asked to recall.
If we are able to recall 20 out of 20 events then our recall ratio will be 1 or 100%, but if you are able to correctly recall only 10 events out of 20 events then recall ratio will be 0.5 or 50%.
Whereas, precision means how many events we can correctly recall out of a total number of events which we recall (sum of both correct and incorrect events).
For example, if we tell that ok, I have correctly recalled 15 events but actually, I have only correctly recalled 10 events, in this case out of 15 times of I am precise in 10 events.
So, precision can be defined as the ratio of the number of events the algorithm can correctly recall out of the total number of events that which the algorithm recalls (sum of the correct events as well as the incorrect events).
In this case, we have recalled 15 events, but out of that only 10 events were correct, hence your precision rate is 10 by 15, i.e 66.67%.
Similarly, in the case of machine learning Recall and Precision are used to identify the performance of machine learning algorithms. Apart from that, there are other sophisticated measures like Sensitivity, Specificity, ROC and AUC which are also used for performance measurement of machine learning algorithms.
If this piece interest you, you can mail to smartsubu2020 to know more.