ROC curve
Confusion matrix example
|
|
Predicted A=0 |
Predicted A=1 |
|
Fact A=0 |
25 |
10 |
|
Fact A =1 |
5 |
30 |
Confusion
Matrix definition
|
|
Predicted A=0 (negative) |
Predicted A=1 (positive) |
|
Fact A=0 (negative) |
a |
b |
|
Fact A =1 (positive) |
c |
d |
Further definitions
|
|
Predicted A=0 (negative) |
Predicted A=1 (positive) |
|
|
Fact A=0 (negative) |
TN=a/(a+b) |
FP=b/(a+b) |
|
|
Fact A =1 (positive) |
FN=c/(c+d) |
TP=recall =d/(c+d) |
|
|
|
|
Precision P=d/(b+d) |
Accuracy AC=(a+d)/(a+b+c+d) |
ROC graph: x=FP and y=TP
You can also graph: x=P and y=AC and other pairs from the last table.
In addition you can read 1 and 2. Note that the notation differs from used above.
Table: Schematic
outcomes of a test.
More terms
|
|
Predicted A=0 (negative) |
Predicted A=1 (positive) |
|
Fact A=0 (negative) |
TN=specificity= a/(a+b) |
FP=(1-specificity)= b/(a+b) |
|
Fact A =1 (positive) |
FN=(1-sencitivity) = c/(c+d) |
TP=recall=sensitivity =d/(c+d) |
|
Accuracy =AC=(a+d)/(a+b+c+d) |
|
Positive
Likelihood Ratio= TP/FP |
|
Negative
Likelihood Ratio= FN/TN |
|
Positive
Predictive Value=Precision=P= d/(d+b) |
|
Negative
Predictive Value = a/(c+a) |

From 1