The F-measure or F score, also called as F1 score is calculated as the harmonic mean of precision and recall, giving each the same weighting. It allows a model to be evaluated taking both the precision and recall into account using a single score, which is helpful when describing the performance of the model and in comparing models.
\[ F_{1}=2.\frac{{precision} \times {recall}}{{precision} + {recall}} \]
The Fbeta-measure is a generalization of the F-measure that adds a configuration parameter called beta. A default beta value is 1.0, which is the same as the F-measure. A smaller beta value, such as 0.5, gives more weight to precision and less to recall, whereas a larger beta value, such as 2.0, gives less weight to precision and more weight to recall in the calculation of the score.
\[ F_{{\beta}} = \frac{(1 + {\beta}^2). (precision.recall)}{({\beta}^2.precision+recall)} \]
Summary
- Precision and recall provide two ways to summarize the errors made for the positive class in a binary classification problem.
- F-measure provides a single score that summarizes the precision and recall.
- Fbeta-measure provides a configurable version of the F-measure to give more or less attention to the precision and recall measure when calculating a single score.