# Confusion regarding classification accuracy calculation and result

The total number of data points for which the following result is obtained = 1500. Out of which, I have

• 1473 labelled as 0 and
• the remaining 27 as 1 .

As can be seen from the confusion matrix, out of 27 data points belonging to class 1, I got only 1 data point misclassified as 0 . So, I calculated the accuracy for individual classes and got Accuracy for class labelled as 0 = 98.2% and for the other as 1.7333%. Is this calculation correct? I am not sure...I did get a pretty good classification for the class labelled as 1 so why the accuracy for it is low? The individual class accuracies should have been 100% for class0 and around 98% for class1

Does one misclassification reduce the accuracy of class 1 by so much amount? This is the how I calculated the individual class accuracies in MAtlab.

cmMatrix  =
1473    0
1       26

acc_class0  = 100*(cmMatrix(1,1))/1500;
acc_class1= 100*(cmMatrix(2,2))/1500;

• Can you tell what you mean by class 0 and class 1? And what your task is? Without this information, I can't say if this is what you should be looking at. Jul 10, 2018 at 4:41

Accuracy = (TP + TN) / (P + N) = (26 + 1473)/1500 = 99.9%
I guess, if you want the break down by the class, it would have been: 1473/1473 and 26/27, but you have 1500 as the denominator in both classes.