In R caret library, if I got a confusion matrix like this below, if there a way to retrieve the overall accuracy 0.992? I can't get this single value out, since I need to store this value and use it for later processing. Is this possible at all?
Prediction A B C D E
A 1114 2 0 0 0
B 9 745 5 0 0
C 0 6 674 4 0
D 0 0 3 640 0
E 0 0 2 1 718
Overall Statistics
Accuracy : 0.992
95% CI : (0.989, 0.994)
No Information Rate : 0.286
P-Value [Acc > NIR] : <2e-16
Kappa : 0.99
Mcnemar's Test P-Value : NA
Statistics by Class:
Class: A Class: B Class: C Class: D Class: E
Sensitivity 0.992 0.989 0.985 0.992 1.000
Specificity 0.999 0.996 0.997 0.999 0.999
Pos Pred Value 0.998 0.982 0.985 0.995 0.996
Neg Pred Value 0.997 0.997 0.997 0.998 1.000
Prevalence 0.286 0.192 0.174 0.164 0.183
Detection Rate 0.284 0.190 0.172 0.163 0.183
Detection Prevalence 0.284 0.193 0.174 0.164 0.184
Balanced Accuracy 0.996 0.992 0.991 0.996 1.000