
In
statistical
Statistics (from German: '' Statistik'', "description of a state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, industr ...
analysis of
binary classification
Binary classification is the task of classifying the elements of a set into two groups (each called ''class'') on the basis of a classification rule. Typical binary classification problems include:
* Medical testing to determine if a patient ha ...
, the F-score or F-measure is a measure of a test's
accuracy
Accuracy and precision are two measures of '' observational error''.
''Accuracy'' is how close a given set of measurements (observations or readings) are to their '' true value'', while ''precision'' is how close the measurements are to each ot ...
. It is calculated from the
precision and
recall
Recall may refer to:
* Recall (bugle call), a signal to stop
* Recall (information retrieval), a statistical measure
* ''ReCALL'' (journal), an academic journal about computer-assisted language learning
* Recall (memory)
* ''Recall'' (Overwat ...
of the test, where the precision is the number of true positive results divided by the number of all positive results, including those not identified correctly, and the recall is the number of true positive results divided by the number of all samples that should have been identified as positive. Precision is also known as
positive predictive value
The positive and negative predictive values (PPV and NPV respectively) are the proportions of positive and negative results in statistics and diagnostic tests that are true positive and true negative results, respectively. The PPV and NPV de ...
, and recall is also known as
sensitivity
Sensitivity may refer to:
Science and technology Natural sciences
* Sensitivity (physiology), the ability of an organism or organ to respond to external stimuli
** Sensory processing sensitivity in humans
* Sensitivity and specificity, statisti ...
in diagnostic binary classification.
The F
1 score is the
harmonic mean
In mathematics, the harmonic mean is one of several kinds of average, and in particular, one of the Pythagorean means. It is sometimes appropriate for situations when the average rate is desired.
The harmonic mean can be expressed as the recipr ...
of the precision and recall. The more generic
score applies additional weights, valuing one of precision or recall more than the other.
The highest possible value of an F-score is 1.0, indicating perfect precision and recall, and the lowest possible value is 0, if either precision or recall are zero.
Etymology
The name F-measure is believed to be named after a different F function in Van Rijsbergen's book, when introduced to the Fourth
Message Understanding Conference The Message Understanding Conferences (MUC) for computing and computer science, were initiated and financed by DARPA (Defense Advanced Research Projects Agency) to encourage the development of new and better methods of information extraction. T ...
(MUC-4, 1992).
Definition
The traditional F-measure or balanced F-score (F
1 score) is the
harmonic mean
In mathematics, the harmonic mean is one of several kinds of average, and in particular, one of the Pythagorean means. It is sometimes appropriate for situations when the average rate is desired.
The harmonic mean can be expressed as the recipr ...
of precision and recall:
:
.
Fβ score
A more general F score,
, that uses a positive real factor
, where
is chosen such that recall is considered
times as important as precision, is:
:
.
In terms of
Type I and type II errors
In statistical hypothesis testing, a type I error is the mistaken rejection of an actually true null hypothesis (also known as a "false positive" finding or conclusion; example: "an innocent person is convicted"), while a type II error is the fa ...
this becomes:
:
.
Two commonly used values for
are 2, which weighs recall higher than precision, and 0.5, which weighs recall lower than precision.
The F-measure was derived so that
"measures the effectiveness of retrieval with respect to a user who attaches
times as much importance to recall as precision". It is based on
Van Rijsbergen's effectiveness measure
:
.
Their relationship is
where
.
Diagnostic testing
This is related to the field of
binary classification
Binary classification is the task of classifying the elements of a set into two groups (each called ''class'') on the basis of a classification rule. Typical binary classification problems include:
* Medical testing to determine if a patient ha ...
where recall is often termed "sensitivity".
Dependence of the F-score on class imbalance
Precision-recall curve, and thus the
score, explicitly depends on the ratio
of positive to negative test cases.
[
]
This means that comparison of the
F-score across different problems with differing class ratios is
problematic. One way to address this issue (see e.g., Siblini et al,
2020
[
]
) is to use a standard class ratio
when making such comparisons.
Applications
The F-score is often used in the field of
information retrieval for measuring
search
Searching or search may refer to:
Computing technology
* Search algorithm, including keyword search
** :Search algorithms
* Search and optimization for problem solving in artificial intelligence
* Search engine technology, software for findi ...
,
document classification
Document classification or document categorization is a problem in library science, information science and computer science. The task is to assign a document to one or more classes or categories. This may be done "manually" (or "intellectually") ...
, and
query classification
A Web query topic classification/categorization is a problem in information science. The task is to assign a Web search query to one or more predefined categories, based on its topics. The importance of query classification is underscored by many ...
performance. Earlier works focused primarily on the F
1 score, but with the proliferation of large scale search engines, performance goals changed to place more emphasis on either precision or recall and so
is seen in wide application.
The F-score is also used in
machine learning
Machine learning (ML) is a field of inquiry devoted to understanding and building methods that 'learn', that is, methods that leverage data to improve performance on some set of tasks. It is seen as a part of artificial intelligence.
Machine ...
. However, the F-measures do not take true negatives into account, hence measures such as the
Matthews correlation coefficient
In statistics, the phi coefficient (or mean square contingency coefficient and denoted by φ or rφ) is a measure of association for two binary variables. In machine learning, it is known as the Matthews correlation coefficient (MCC) and used as a ...
,
Informedness
Youden's J statistic (also called Youden's index) is a single statistic that captures the performance of a dichotomous diagnostic test. Informedness is its generalization to the multiclass case and estimates the probability of an informed decision ...
or
Cohen's kappa
Cohen's kappa coefficient (''κ'', lowercase Greek kappa) is a statistic that is used to measure inter-rater reliability (and also intra-rater reliability) for qualitative (categorical) items. It is generally thought to be a more robust measure tha ...
may be preferred to assess the performance of a binary classifier.
The F-score has been widely used in the natural language processing literature,
such as in the evaluation of
named entity recognition
Named-entity recognition (NER) (also known as (named) entity identification, entity chunking, and entity extraction) is a subtask of information extraction that seeks to locate and classify named entities mentioned in unstructured text into pre- ...
and
word segmentation
Text segmentation is the process of dividing written text into meaningful units, such as words, sentences, or topics. The term applies both to mental processes used by humans when reading text, and to artificial processes implemented in comput ...
.
Properties
The F
1 score is the
Dice coefficient of the set of retrieved items and the set of relevant items.
Criticism
David Hand and others criticize the widespread use of the F
1 score since it gives equal importance to precision and recall. In practice, different types of mis-classifications incur different costs. In other words, the relative importance of precision and recall is an aspect of the problem.
According to Davide Chicco and Giuseppe Jurman, the F
1 score is less truthful and informative than the
Matthews correlation coefficient (MCC) in binary evaluation classification.
David Powers has pointed out that F
1 ignores the True Negatives and thus is misleading for unbalanced classes, while kappa and correlation measures are symmetric and assess both directions of predictability - the classifier predicting the true class and the true class predicting the classifier prediction, proposing separate multiclass measures
Informedness
Youden's J statistic (also called Youden's index) is a single statistic that captures the performance of a dichotomous diagnostic test. Informedness is its generalization to the multiclass case and estimates the probability of an informed decision ...
and
Markedness
In linguistics and social sciences, markedness is the state of standing out as nontypical or divergent as opposed to regular or common. In a marked–unmarked relation, one term of an opposition is the broader, dominant one. The dominant defau ...
for the two directions, noting that their geometric mean is correlation.
Another source of critique of F
1, is its lack of symmetry. It means it may change its value when dataset labeling is changed - the "positive" samples are named "negative" and vice versa.
This criticism is met by the
P4 metric definition, which is sometimes indicated as a symmetrical extension of F
1.
Difference from Fowlkes–Mallows index
While the F-measure is the
harmonic mean
In mathematics, the harmonic mean is one of several kinds of average, and in particular, one of the Pythagorean means. It is sometimes appropriate for situations when the average rate is desired.
The harmonic mean can be expressed as the recipr ...
of recall and precision, the
Fowlkes–Mallows index
The Fowlkes–Mallows index is an external evaluation method that is used to determine the similarity between two clusterings (clusters obtained after a clustering algorithm), and also a metric to measure confusion matrices. This measure of si ...
is their
geometric mean
In mathematics, the geometric mean is a mean or average which indicates a central tendency of a set of numbers by using the product of their values (as opposed to the arithmetic mean which uses their sum). The geometric mean is defined as the ...
.
Extension to multi-class classification
The F-score is also used for evaluating classification problems with more than two classes (
Multiclass classification
In machine learning and statistical classification, multiclass classification or multinomial classification is the problem of classifying instances into one of three or more classes (classifying instances into one of two classes is called binary c ...
). In this setup, the final score is obtained by micro-averaging (biased by class frequency) or macro-averaging (taking all classes as equally important). For macro-averaging, two different formulas have been used by applicants: the F-score of (arithmetic) class-wise precision and recall means or the arithmetic mean of class-wise F-scores, where the latter exhibits more desirable properties.
[ ]
See also
*
BLEU
*
Confusion matrix
In the field of machine learning and specifically the problem of statistical classification, a confusion matrix, also known as an error matrix, is a specific table layout that allows visualization of the performance of an algorithm, typically a ...
*
Hypothesis tests for accuracy
*
METEOR
A meteoroid () is a small rocky or metallic body in outer space.
Meteoroids are defined as objects significantly smaller than asteroids, ranging in size from grains to objects up to a meter wide. Objects smaller than this are classified as mic ...
*
NIST (metric) NIST is a method for evaluating the quality of text which has been translated using machine translation. Its name comes from the US National Institute of Standards and Technology.
It is based on the BLEU metric, but with some alterations. Where ...
*
Receiver operating characteristic
A receiver operating characteristic curve, or ROC curve, is a graphical plot that illustrates the diagnostic ability of a binary classifier system as its discrimination threshold is varied. The method was originally developed for operators of m ...
*
ROUGE (metric)
*
Uncertainty coefficient
In statistics, the uncertainty coefficient, also called proficiency, entropy coefficient or Theil's U, is a measure of nominal association. It was first introduced by Henri Theil and is based on the concept of information entropy.
Definition
...
, aka Proficiency
*
Word error rate Word error rate (WER) is a common metric of the performance of a speech recognition or machine translation system.
The general difficulty of measuring performance lies in the fact that the recognized word sequence can have a different length from ...
*
LEPOR
References
{{DEFAULTSORT:F1 Score
Statistical natural language processing
Evaluation of machine translation
Statistical ratios
Summary statistics for contingency tables
Clustering criteria
de:Beurteilung eines Klassifikators#Kombinierte Maße