Prev: dynamically scaling transfer function coefficients
Next: mbuild not work in Windows7X64 with VS2008+SDK7
From: Kevin on 25 Mar 2010 12:23 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? |