The F1 score is an evaluation metric that condenses classification results into a single number, the harmonic mean of precision and recall. It takes values from 0 to 1, and values closer to 1 mean the classifier "misses nothing it should catch, and catches nothing it should not".
Here, is precision (the fraction of items predicted positive that are actually positive), and is recall (the fraction of actually positive items that were predicted positive).
Consider spam filtering as an example. High precision means "almost everything flagged as spam really is spam", and high recall means "almost no spam slips through". Either one alone is easy to raise: flagging everything as spam gives a recall of 1, but precision drops. The F1 score combines the two so that it is high only when both are high.
It originates from the effectiveness measure that the information retrieval researcher van Rijsbergen presented in his 1979 book. Today's F-measure corresponds to , and the version that weights precision and recall equally is called the F1 score.

