I'm thinking through the logic of Naive Bayes and encountered a brain teaser. I know that adding smoothing (alpha) to Naive Bayes can help to increase the accuracy of the model, which implies that it must change the predictions the model makes. However, I'm having trouble coming up with a toy example where it would change the prediction. Can anyone help me come up with one?
More specificall (and with code) I'm looking for a set of (x
,y
,x_1
) where....
from sklearn.naive_bayes import CategoricalNB
m = CategoricalNB(alpha=0)
m.fit(x,y)
m.predict(x_1)
and
from sklearn.naive_bayes import CategoricalNB
m = CategoricalNB(alpha=1)
m.fit(x,y)
m.predict(x_1)
produce different predictions