From: Kevin on
I wrote the following Program

training=[0;1;1;0;1];
class=[0;1;0;0;0];
test=[0;1;1;0];
ls=NaiveBayes.fit(training,class,'Dist','mn');
fprintf('%d\n',posterior(ls,test));
fprintf('%d\n',predict(ls,test));


I expected the posterior probability for the first test point (0) to be 0.667 for class 0 and 0.333 for class 1. I get 0.8 and 0.20 instead. What am I missing?