6
$\begingroup$

Can Precision and Recall be used to Generate TPR or FPR? In other words, is there any formula that relates the following Evaluation metrics?

  1. True Positive Rate (TPR) with either Precision or Recall (e.g. TPR = 1-[Precision/Recall])
  2. False Positive Rate (FPR) with Precision or Recall {e.g. FPR = [Recall/Precision] * 2 * Recall}
$\endgroup$
2

1 Answer 1

5
$\begingroup$
  1. Per Wikipedia, the TPR is exactly the same as recall. These are two words for the same concept.

  2. You cannot calculate the FPR from precision and recall alone. Here are a few examples where precision and recall are both $\frac{1}{11}$, but FPR has different values:

    TP FP TN FN  precision     recall       FPR
    1  10  1 10 0.09090909 0.09090909 0.9090909
    1  10  2 10 0.09090909 0.09090909 0.8333333
    1  10  3 10 0.09090909 0.09090909 0.7692308
    1  10  4 10 0.09090909 0.09090909 0.7142857
    1  10  5 10 0.09090909 0.09090909 0.6666667
    1  10  6 10 0.09090909 0.09090909 0.6250000
    1  10  7 10 0.09090909 0.09090909 0.5882353
    1  10  8 10 0.09090909 0.09090909 0.5555556
    1  10  9 10 0.09090909 0.09090909 0.5263158
    1  10 10 10 0.09090909 0.09090909 0.5000000
    

    The key point is that the FPR uses TN, but TN appears neither in precision nor in recall, so we cannot deduce it from precision and recall.

    It's quite easy to quickly look for such counterexamples by looking through all $10,000$ combinations where $1\leq TP, FP, TN, FN\leq 10$. I reused the R code I already used here.

$\endgroup$
2
  • $\begingroup$ To avoid confusion, I suggest not using "precisely" in "... is precisely recall.", since Precision is one of the concept OP is asking for. $\endgroup$ Commented Jul 4, 2023 at 18:01
  • $\begingroup$ @MichaelGruner: good point, I have edited. $\endgroup$ Commented Jul 4, 2023 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.