Precision and recall are two complementary metrics derived from the confusion matrix that answer different questions. Precision states what proportion of the samples the model labelled positive really are positive – in other words, how far its alarms can be trusted. Recall states what proportion of all genuinely positive cases the model found – in other words, how many did not escape it. Between the two there is a necessary trade-off governed by moving the decision threshold: lowering the threshold makes the model flag more cases, which raises recall and lowers precision, and raising it does the opposite. Their balanced summary is the F1 score, the harmonic mean of both, which unlike the arithmetic mean harshly penalises the case where one of the values is very low; the weighted variant is F-beta, which allows one side to be deliberately favoured. The choice of priority is always substantive: in recommending products to a customer precision matters, because a bad suggestion annoys, whereas in detecting fraud or disease recall matters, because a missed case is costlier. For an overall assessment across all thresholds, the ROC curve or the precision-recall curve is used.
Imagine an angler asked to take every carp out of a pond. Precision answers the question: “Of everything you pulled out, how much was actually carp?” Recall answers: “How many of the pond’s carp did you get out?” If you net the entire pond, your recall is a hundred per cent, but your net also holds a tyre and three pike. If you take out just one carp that you had picked out in advance, your precision is a hundred per cent and your recall negligible. Which extreme is worse depends purely on whether you are cooking soup for one person or clearing the pond before winter.