MATLAB: Variable ‘nb11’ originally saved as a NaiveBayes cannot be instantiated as an object and will be read in as a uint32.

naivebayesposterior

First of all, sorry for poor English writing.
I have a promblem,
when I load the nb_classifier.mat file, it will show me a error message "Warning: Variable 'nb' originally saved as a NaiveBayes cannot be instantiated as an object and will be read in as a uint32. ".
This value will be used to "post = posterior(nb,data);" , and that was originally a NaiveBayes value for nb.
How can I solve it? Thank!

Best Answer

The class NaiveBayes is not available when you load the .mat .
The NaiveBayes class was removed a few years ago.
You will need to go back to about R2014b to extract the data from the objects, and use them to create new objects that can be used in later releases.