Watch: F1 Score
The harmonic mean of precision and recall — the standard single-number summary of classifier performance when both false positives and false negatives matter.
Transcript
When you are evaluating a machine learning model, relying on simple accuracy can be highly misleading. If ninety-five percent of your dataset is human-written text, a model that simply labels everything as human-written will be ninety-five percent accurate, even though it is completely useless at detecting AI.
That is why machine learning pipelines often rely on the F1 score.
The F1 score is a single metric that balances precision and recall. Precision is about how many of the model's positive predictions were actually correct, while recall is about how many of the actual positive cases the model managed to find.
Instead of a simple average, the F1 score uses what is called a harmonic mean. This math is crucial because it heavily penalizes extreme imbalances. If a model has perfect precision but zero recall, a regular average would give it a passing grade, but the F1 score drops it straight to zero.
You can also adjust this metric depending on your goals. An F-two score weights recall more heavily, which is useful when missing a positive case is a major problem. An F-point-five score does the opposite, prioritizing precision. For complex models with multiple labels, you can use macro-averages to treat every category equally, or micro-averages to pool all the data together.
Ultimately, because the F1 score focuses on how well a model actually handles the cases that matter, it is the industry standard for selecting and shipping the best possible model checkpoints.
