0
$\begingroup$

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;
$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Ankit Seth Jul 10 '18 at 4:41
1
$\begingroup$

You might want to take a look at the confusion matrix wiki page.

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.

Even though I think conventionally most people report on the entire model rather than just on a particular class.

$\endgroup$
  • $\begingroup$ thank you for your answer. I did make the mistake in the denominator. When reporting classification results in research article, do we report on the test set which is the set that has never been used in the training and not seen by the model Or is it on the entire dataset that has been retrained on the model? $\endgroup$ – Srishti M Jul 10 '18 at 15:29
  • $\begingroup$ I am sorry but I am not an academic, so I am not sure the proper way to report it in a research article. That being said, it could be a sign for a model to have an accuracy as high as 99.9%, you should probably do your due diligence to ensure that it is not overfitting. $\endgroup$ – The Lyrist Jul 10 '18 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.