Why, in the second practice lab, are we attempting to maximize the F1 score for each epsilon value? The primary goal of the F1 metric is to strike a balance between precision and recall, rather than seeking to maximize F1.
I believe those are the same thing.
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
I am trying to state the assigned calculation is about if tp+fp is ==0, then precision is 1, that doesn’t mean the calculation comes to 1.
also another reason which I can understand if precision and recall comes to 0 and then F1 score has no value as it is harmonic mean of precision and recall which gives more better measure of incorrectly diagnosed cases.
So here assigning precision and recall as 1 is because of the ability to test the true positive in positive predicted case (i.e. tp and fp) and true postive case from all the actually active cases(i.e. tp and fn)