PadhaiTime Logo
Padhai Time

F1 Score

F1 score is the harmonic mean of Precision and Recall. It aggregates both Precision and Recall and brings it down to a single metric.

 

Let us revise about harmonic mean first:

Harmonic Mean is the reciprocal of the average of the reciprocals of the data values

undefined

 

And F1 score is the harmonic mean of only 2 data values which is Precision and Recall.

Formula for F1 score is as follows:

undefined

In the formula mentioned above, weightage given to Precision and Recall are same. In case we are more concerned about Precision and less about Recall, then we can provide more weightage to Precision and less to Recall. This type of flexibility is available through F-Beta measure.

 

Now let us discuss the F-Beta measure. 

 

F-Beta Measure:

It is a more general measure than F1 Score.

Formula:

undefined

 

A parameter called Beta has been provided with this formula so that we can tweak the weight and accordingly Precision or Recall can be given higher importance.

  • When Beta is 1, then it is called as F1 Measure where weightage of Precision and Recall remains equal
  • When Beta is 0.5, then it is called as F0.5 Measure where more weight is given to Precision and less to Recall.
  • When Beta is 2, then it is called as F2 Measure where more weight is given to Recall and less to Precision.

 

In the next article we will be using these metrics to evaluate our classification model. Stay tuned!!

Bengaluru, India
contact.padhaitime@gmail.com
  • We collect cookies and may share with 3rd party vendors for analytics, advertising and to enhance your experience. You can read more about our cookie policy by clicking on the 'Learn More' Button. By Clicking 'Accept', you agree to use our cookie technology.
    Our Privacy policy can be found by clicking here