F1 Score

Why Trust Techopedia

What Does F1 Score Mean?

An F1 score is a metric used in machine learning (ML) to evaluate how accurately a binary classification model classifies new input, taking both precision and recall metrics into account.

Advertisements

Precision measures how often the model is correct when it predicts a positive instance.

Recall measures how well the model is able to find all the positive instances in a dataset.

F1 scores combine these two metrics to create a single score that represents the overall accuracy of the model.

F1 scores are often used to compare the performance of different models or to optimize the hyperparameters of a single model. F1 scores range from 0 to 1. The higher score, the more accurate the outputs.

Techopedia Explains F1 Score

Mathematically, F1 scores represent the harmonic mean of precision and recall.

Harmonic mean is a type of average that’s used when the values that are being averaged are ratios. It is calculated by taking the reciprocal of each value, finding their average and then using the reciprocal of that average as the mean. This formula puts more weight on smaller values, so if one of the values that is being averaged is extremely low, the harmonic mean will also be low.

Using the harmonic mean to determine the accuracy of a binary classification model ensures that the impact of such low values will be appropriately reflected in the overall score.

The Usefulness of F1 Scores

F1 scores are particularly useful when one class in the data set that’s used to train the model has significantly more instances than the other class.

F1 scores are often used to evaluate binary classification models designed to:

  • Classify emails as either being spam or not spam.
  • Classify medical images as being either positive or negative for a specific condition.
  • Classify loan applications as either being high or low risk.
  • Classify financial transactions as being either fraudulent or non-fraudulent.
  • Classify text data as being either positive or negative in sentiment.
Advertisements

Related Questions

Related Terms

Margaret Rouse
Editor

Margaret jest nagradzaną technical writerką, nauczycielką i wykładowczynią. Jest znana z tego, że potrafi w prostych słowach pzybliżyć złożone pojęcia techniczne słuchaczom ze świata biznesu. Od dwudziestu lat jej definicje pojęć z dziedziny IT są publikowane przez Que w encyklopedii terminów technologicznych, a także cytowane w artykułach ukazujących się w New York Times, w magazynie Time, USA Today, ZDNet, a także w magazynach PC i Discovery. Margaret dołączyła do zespołu Techopedii w roku 2011. Margaret lubi pomagać znaleźć wspólny język specjalistom ze świata biznesu i IT. W swojej pracy, jak sama mówi, buduje mosty między tymi dwiema domenami, w ten…