What is F1-score and what is it’s importance in Machine learning?

F1-Score or F-measure is an evaluation metric for a classification defined as harmonic mean of precision and recall. It is a statistical measure of accuracy of a test or model. Mathematically, it is expressed as follows,

Here, the value of F-measure(F1-score) reaches best value at 1 and worst value at 0. F1-score 1 represents the perfect accuracy and recall of the model.

Now let’s see what Recall and precision actually means,

Recall: It tells us what proportion of Data belonging to a certain class say, class A is classified correctly as in class A by our classifier.

Precision: It tells us what proportion of data that our classifier has classified in a certain class, say class A actually belongs to the same class A.

To understand more about precision and recall with a mathematical example, you can visit here.

What is the importance of F1-score?

F1-Score (F-measure) is an evaluation metric, that is used to express the performance of machine learning model (or classifier). It gives the combined information about the precision and recall of a model. Means high F1-score indicates high value for both recall and precision. Generally, F1-score is used when we need to compare two or more machine learning algorithms for same data. We opt for the algorithm whose f1 score is higher.

Insert math as
$${}$$