Intermediate · Evaluation
F1
Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.
TL;DR. A metric balancing precision and recall for binary classification tasks.
Technical Definition
A metric balancing precision and recall for binary classification tasks.
How it works
The F1 score is a harmonic mean of precision and recall, providing a single metric that balances the trade-off between these two important measures in binary classification. It is particularly useful when class distribution is uneven. The formula is 2 * (precision * recall) / (precision + recall).
Related Concepts
- Precision — Of the items the model predicted positive, the fraction that are actually positive.
- Recall — Of all the actually positive items, the fraction the model successfully found.
- Binary classification — A machine learning task that categorizes input into one of two mutually exclusive classes, like 'spam' or 'not spam'.