Trouble with NaiveBayes object in Statistics toolbox (R2010a)
Mostrar comentarios más antiguos
Hello,
I am having trouble using the NaiveBayes class and associated functions in my R2010a. Specifically, I am unable to run the NaiveBayes.fit demo on the demo dataset. When I say:
load fisheriris >> O1 = NaiveBayes.fit(meas,species);
I get ??? Error using ==> vertcat CAT arguments dimensions are not consistent.
Error in ==> NaiveBayes.fit>gaussianFit at 540 obj.Params(i,obj.GaussianFS) = mat2cell([mu;sigma],2,...
Error in ==> NaiveBayes.fit at 498 obj = gaussianFit(obj, training, gindex);
I tried t o look for an overload function for gaussianFit but did not find any.
I am however, able to run it with a 'mvmn' density model rather than a Gaussian density (default). Despite this, when I run
[post,cpre] = O1.posterior(meas);
I get all NaNs in the result. I checked that the values in O1.params are not NaNs.
What could be wrong? Any help is appreciated.
Respuesta aceptada
Más respuestas (1)
Tom Lane
el 26 de Ag. de 2011
0 votos
I would not expect this to be a problem unless your path was set up in an unusual way. If I type "which nansum" I see the stats version. If I type "which -all nansum" I see the fints version after the stats version. If I type "type nansum" I see the contents of the stats version. What do those three commands do for you?
1 comentario
Pavan
el 29 de Ag. de 2011
Categorías
Más información sobre Classification Ensembles en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!