Problem with the naive bayes classifier from the stats toolbox.
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a problem using the Naive Bayes classifier from the statistiques toolbox. I'm having the following error :
??? Error using ==> NaiveBayes.fit>gaussianFit at 528 For Gaussian distribution, each class must have at least two non-missing values.
Error in ==> NaiveBayes.fit at 498 obj = gaussianFit(obj, training, gindex);
Error in ==> nBayes at 53 O = NaiveBayes.fit(Xl,Cl,'dist','normal','Prior','empirical'); % build the model
Xl and Cl have the right dimensions, so I don't see from where the problem comes.
0 Kommentare
Antworten (1)
the cyclist
am 25 Feb. 2013
Well, the error message is telling you that one of your classes does not have at least two non-missing values.
I suggest you type
>> dbstop if error
before running your code. Then, when you run your code, it will stop execution when it hits the error. You can then look at the values of your variables to get a hint at the problem.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Naive Bayes finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!