Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When are precision and recall inversely related?

I am reading about precision and recall in machine learning.

Question 1: When are precision and recall inversely related? That is, when does the situation occur where you can improve your precision but at the cost of lower recall, and vice versa? The Wikipedia article states:

Often, there is an inverse relationship between precision and recall, where it is possible to increase one at the cost of reducing the other. Brain surgery provides an obvious example of the tradeoff.

However, I have seen research experiment results where both precision and recall increase simultaneously (for example, as you use different or more features).

In what scenarios does the inverse relationship hold?

Question 2: I'm familiar with the precision and recall concept in two fields: information retrieval (e.g. "return 100 most relevant pages out of a 1MM page corpus") and binary classification (e.g. "classify each of these 100 patients as having the disease or not"). Are precision and recall inversely related in both or one of these fields?

like image 896
stackoverflowuser2010 Avatar asked Mar 19 '23 18:03

stackoverflowuser2010


1 Answers

The inverse relation only holds when you have some parameter in the system that you can vary in order to get more/less results. Then there's a straightforward relationship: you lower the threshold to get more results and among them some are TPs and some FPs. This, actually, doesn't always mean that precision or recall will rise and fall simultaneously - the real relationship can be mapped using the ROC curve. As for Q2, likewise, in both of these tasks precision and recall are not necessarily inversely related.

So, how do you increase recall or precision, not impacting the other simultaneously? Usually, by improving the algorithm or model. I.e. when you just change parameters of a given model, the inverse relationship will usually hold, although you should mind that it will also be usually non-linear. But if you, for example, add more descriptive features to the model, you can increase both metrics at once.

like image 168
Vsevolod Dyomkin Avatar answered Apr 07 '23 01:04

Vsevolod Dyomkin