Last active
August 29, 2017 14:41
-
-
Save gcnit/5bd19014d7a3ccc8c1547730ec30a205 to your computer and use it in GitHub Desktop.
Binary Classification Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sample Values: | |
Actual Predicted | |
1 1 | |
0 0 | |
0 1 | |
1 0 | |
1 1 | |
0 0 | |
0 0 | |
1 0 | |
Metrics: | |
P = 4 | |
N = 4 | |
P' = 3 | |
N' = 5 | |
TP = 2 | |
TN = 3 | |
FP = 1 | |
FN = 2 | |
P + N = 8 | |
TP + TN = 5 | |
FP + FN = 3 | |
TP + FN = P = 4 | |
TN + FP = N = 4 | |
TP + FP = P’ = 3 | |
TN + FN = N’ = 5 | |
ACC = (TP + TN)/(P + N) = 5/8 = 0.625 | |
Recall/TPR = TP/P = 2/4 = 0.5 | |
FNR = FN/P = 2/4 = 0.5 | |
TNR = TN/N = 3/4 = 0.75 | |
FPR = FP/N = 1/4 = 0.25 | |
Precision/PPV = TP/P’ = 2/3 = 0.67 | |
FDR = FP/P’ = 1/3 = 0.33 | |
NPV = TN/N’ = 3/5 = 0.6 | |
FOR = FN/N’ = 2/5 = 0.4 | |
LR+ = TPR/FPR = 0.5/0.25 = 2 | |
LR- = FNR/TNR = 0.5/0.75 = 0.67 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment