Posts

Showing posts from April, 2018

Accuracy, F Measure (aka F1 score), precision, recall

If you have gone through machine learning or any statistics related research literature I am pretty sure that you have come across cases where something called F Measure is calculated than the accuracy in some tests. In this short blog let's clear out what is F Measure and why is it needed rather than the simple accuracy. Let's say in a binary classification task some rare incident is predicted. (Can be predicting the occurrence of a landslide given the weather conditions, landslides are rare :-P) If that rare incident only occurs for 1% of the time, a binary classification model predicting all negative (or 0) will get an accuracy of 99%. Does that make the model a good one? No! (Usually, a model having an accuracy of 99% will be dope!) Now you see there is a problem with the accuracy. The solution is to use F Measure or F1 score or F score or... Let's look at the equation for calculating F measure. \[F1 = \frac{2}{\frac{1}{Precision} + \frac{1}{Recall}}\] If yo...