In: Statistics and Probability
Using the following values on some evaluation measures:
# Instances = 1000
Accuracy = 70%
Precision = 62.5%
Recall = 71.43%
A) Reconstruct the corresponding confusion matrix.
B) Report the TPR value of that confusion matrix.
C) Report the FPR value of that confusion matrix.
We know that the total values are 1000.
Actual\Predicted | True | False |
True | a | b |
False | c | d |
We know that:
i. accuracy is 70%
Thus,
(a+d) / (a+b+c+d) = 70/100
ii. precision is 62.5%
Thus,
a / (a+c) = 62.5/100
iii. Recall is 71.43%
Thus,
a / (a+b) = 71.43/100
We know that a+b+c+d is 1000.
Thus,
(a+d)= 700
Thus, (b+c)= 300
a / (a+c) = 62.5/100
Thus,
100a= 62.5a+62.5c
37.5a= 62.5c
Thus,
c= 37.5a/ 62.5
a / (a+b) = 71.43/100
Thus,
100a= 71.43a+71.43b
28.57a= 71.43b
b= 28.57a / 71.43
Thus,
(b+c)= 300
[ 28.57a / 71.43 ] + [ 37.5a/ 62.5 ] = 300
[(28.57*62.5)a + (37.5*71.43)a] / 71.43*62.5 = 300
1785.625a + 2678.625a = 4464.375*300
4464.25a =1339313
Thus,
a= 1339313/4464.25
= 300.0085 ~ 300
Thus,
300+d=700
d= 400
300/ (300+c)= 62.5/100
30000= 62.5c+18750
11250= 62.5c
Thus, c= 180
b+c=300
Thus, b= 120
Actual\Predicted | True | False |
True | 300 | 120 |
False | 180 | 400 |
TPR= TP/ (TP+FN)
= 300/ (300+120)
= 0.7142857
FPR= FP/(FP+TN)
= 180/(180+400)
= 0.3103448