2

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}
abafo22
  • 21
  • 3
  • @StephanKolassa, Thank you for your response I really appreciate. What about FPR? is it same as Precision? – abafo22 Dec 30 '21 at 18:29

1 Answers1

3
  1. Per Wikipedia, the TPR is precisely 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.

Stephan Kolassa
  • 95,027
  • 13
  • 197
  • 357