Why maximize the F1 score in lab 2

Hello Cristhian,

To understand F1 concept, understanding Precision and Recall is very important

Precision is the measure of the correctly identified positive cases from all the predicted positive cases. Thus, it is useful when the costs of False Positives is high.

Where as Recall is the measure of the correctly identified positive cases from all the actual positive cases. It is important when the cost of False Negatives is high.

Accuracy is the measure of all the correctly identified cases. It is most used when all the classes are equally important.

Suppose we have a set of 100 patients having cancer but our model is identifying 90 of these patients having cancer.

Accuracy in this case is = 90% which is a high enough number for the model to be considered as ‘accurate’. However, there are 10 patients who actually have cancer and the model predicted that they don’t have it. This would be too of high cost for our model. So for that the model should try to minimize these False Negatives.

That is when F1 score is used.

F1 score is the harmonic mean of Precision and Recall and gives a better measure of the incorrectly classified cases than the Accuracy Metric.

Maximise the F1 score will also maximise the precision and recall and as it would maximize the precision and recall that would give a better measure of incorrectly classified cases than the accuracy metric.

So maximizing the F1 score will remove or penalise the extreme values creating a good balance between both.

In most real-life classification problems, imbalanced class distribution exists and thus F1-score is a better metric to evaluate our model on.

F1-score is used when the False Negatives and False Positives are crucial where as Accuracy is used when the True Positive and True negative are more important.

F1-score is a better metric when there are imbalanced classes where as Accuracy can be used when the class distribution is similar.

So maximising F1 score would get more balanced measure between precision and recall than compare to usual mean.

Regards
DP

1 Like