Precision, recall, accuracy, F1. Four numbers arguing about the same basket of mushrooms.
There are old mushroom hunters, and there are bold mushroom hunters, but there are no old, bold mushroom hunters. old saying
Every mushroom in the forest is either food or poison. The forager does not know which is which until they look closer, and even then they can be wrong. The question is not whether the model makes mistakes. It will. The question is which mistakes you are willing to pay for.
Each mushroom carries one of two true labels: edible or poisonous. Your model makes one of two decisions: pick or leave. Two labels times two decisions gives four cells. Almost every classification metric is some way of reading those four numbers.
Two of these are right. Two are wrong. The two wrong ones have wildly different costs and implications. That gap is where the metrics live.
Each metric compresses those four counts into a single number. Each one answers a different question. Each one is wrong by itself.
Sixty mushrooms grow in the clearing. Thirty are edible, thirty are poisonous. A model has looked at each one and given it a number between zero and one: how confident it is that the mushroom is edible. The two distributions overlap, because nothing in the forest is ever quite that clean.
Your job is the threshold. Pick a number. Every mushroom whose score sits above that line goes into the basket. Drag the slider. Watch the four numbers fight.
Picture a different forest. Most of what grows there is edible. Ninety-nine mushrooms in a hundred are safe. One is a death cap. A model that says "pick everything" is right ninety-nine percent of the time. Ninety-nine percent accuracy. Standing ovation. The forager eats the basket and dies that evening, because the one poisonous mushroom was in there along with the ninety-nine good ones.
Accuracy averages over correct and incorrect decisions without asking what each one costs. When one class is rare, or when one kind of error is much worse than the other, accuracy rewards you for the wrong behaviour. Precision and recall split the question into pieces that can be weighted separately. F1 forces both to be reasonable at once.
F1 weights precision and recall equally. Sometimes that is wrong. A mushroom forager fears poison more than hunger, so they care more about precision. A cancer screening test fears the missed tumour more than the false alarm, so it cares more about recall. The F-beta family lets you write down which side you worry about.
F0.5 weights precision twice as much as recall. F2 weights recall twice as much as precision. The number changes. The argument does not. Beta is the dial that tells the metric how scared of poison you are.
There is no single best threshold. There is no single best metric. There is a forest, a basket, and a forager who has to decide how often they are willing to be wrong, and in which direction.
You estimate the costs of error and choose your target metrics accordingly.