# Naive Bayes missclassification rate across classes

I have a dataset with income, age sex and education as categorical features. I used R to create a Naive Bayes classifier as follows: income ~ age + sex + education.

I got the following a-priori and conditional probabilities.

A-priori probabilities:
Y
10-50K     50-80K     GT 80K
0.80266371 0.12563818 0.07169811

Conditional probabilities:
age
Y             20-30      31-45      GT 45
10-50K 0.20796460 0.34457965 0.44745575
50-80K 0.08303887 0.39752650 0.51943463
GT 80K 0.06811146 0.34055728 0.59133127

sex
Y                F         M
10-50K 0.4798119 0.5201881
50-80K 0.2871025 0.7128975
GT 80K 0.2058824 0.7941176

educ
Y           College     Others   Prof/Phd
10-50K 0.24585177 0.73976770 0.01438053
50-80K 0.49558304 0.44257951 0.06183746
GT 80K 0.53869969 0.29566563 0.16563467


I trained the classifier and got the following confusion matrix for the test dataset.

NBPredictions 10-50K 50-80K GT 80K
10-50K    787    127     67
50-80K      0      0      0
GT 80K      6      5      8


I'm stuck on how to explain why the classifier performs well for the 10-50K class but not so well for the other two classes. At first I thought it could be related to the conditional probabilities. That they influence the classification accuracy of each class. However, I couldn't come up with a pattern in the probabilities that could explain this scenario.

• Is there any reason why shouldn't it? – Tim Apr 18 at 6:05
• This is a question asked in a data analytics course assignment so I was wondering if there is any reason? – Himani Apr 18 at 6:16
• Then please add [self-study] tag and tell us about how did you try to solve it and where are you stuck, as described in here. – Tim Apr 18 at 6:17
• At first I thought it could be related to the conditional probabilities. That they influence the classification accuracy of each class. However, I couldn't come up with a pattern in the probabilities that could explain this scenario. – Himani Apr 18 at 6:36
• Thanks, but could you edit your question to add this information and give us some more details? Our policy with such questions is that we don't solve homeworks, but can give you hints. So the more information you give us on where are you stuck, the more helpful hints you could get (instead of something very general). – Tim Apr 18 at 6:41