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

Here, the value of F-measure(F1-score) reaches the best value at 1 and the 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.

**Also Read:**

- Data Pre-Processing
- What is cross-validation in Machine Learning ?
- What is confusion matrix?
- Loss Functions| Cost Functions in Machine Learning

## What is the importance of the F1 score?

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

No Comments