As many of us would surely agree to the fact that the most confusing part while going through the journey of learning Data science is the confusion matrix and its relatives (Just kidding). In the list of those relatives, we come across some heavy terms like precision, recall, f1score, sensitivity, specificity, true positive rate, false negative rate so on and so forth.
Don't worry!!! ANALYTICSHALA here comes to rescue. Here we will try to demystify all the data science related terminologies. If you are a beginner to data science field and eager to be a master of it and also get a job in analytics, don't forget to check out my blog site every day for new topics.
Now let's get down to explore some of the accuracy measure jargon used in today's data science world.
Precision:
Precision is the proportion of cases correctly identified as belonging to class x among all cases of which the classifier claims that they belong to class x.
Didn't get a single word of the above sentence??? Ok, let's simplify it through a real life example.
Let's say your girlfriend asked you... honey, what do you think... in next week, which of the days it will not rain? so we can have move out and enjoy.
Now as you know your girlfriend is asking you weird questions, but still you gave some random answer to impress your girlfriend. Now lets analyze your answers a bit.
We, can see from your answers, you have tactfully told your girlfriend that next weekend it won't rain. Great !!! Now, if we count the total number of positive observations here i.e. ("Yes, It will rain"), it is 4 (Mon, Tue, Thu and Fri). Just remember this for 2 mins, as it will help us calculating precision.
***Next week comes***
Now time has come for your predictions to show the results. This is the judgement week. How perfect you are in predicting rains. How honest you are to your girlfriend. How romantic this week will be. All these questions will be answered in this current week.
***Next to Next Week Monday***
Now, your judgement week has passed. Unfortunately here is the result for the judgement week.
As you can see, your weekend plan is completely destroyed by rain. However let's get down to out precision calculation topic.
So, if you remember you have told your girlfriend earlier that (Mon, Tue, Thu and Fri), it will rain. But among those days, only Mon and Fri it rained actually.
Hence, out of total 4 positive predictions (Mon, Tue, Thu and Fri), only 2 of them (Mon and Fri) actually turned out to be true.
So our precision will be 2/4 = 0.5 (or 50%)
Hence, we can define our precision in this way. Precision tells us out of total positive predictions made by us (or by your machine learning model), how many have become true.
This was all about precision calculation from layman's point of view. In my next post we will see how precision is calculated in real machine learning model output. I will tell you the significance of precision in various business problems and when you should consider precision value to be optimized over other accuracy measures (like recall, F1-score, Kappa Statistic etc.)
So keep learning friends... even in today's world machines are learning... Why can't you!!!
Keep learning and keep smiling with ANALYTICSHALA with real life funny examples. Provide your valuable comments and suggestions, so that I can provide you the best of my knowledge. Thank you !!!