After using:
nb = NaiveBayes.fit(training, class)
To create a Naive Bayes classifier object, I want to save N-by-D of these objects in a matrix. I have tried to do the following
ARRAYOFNAIVEBAYES(2,3) = nb;
But I get: "Error using NaiveBayes/subsasgn (line 9) The NaiveBayes class does not support subscripted assignments."
How would it be possible to fill a matrix of Naive Bayes classifiers in MATLAB?
Note that using fitNaiveBayes or fitcnb resuts in the same problem as they both return the same kind of object.
Thank you