MATLAB Answers

Parameter manipulation in naive bayes classificator struct

1 view (last 30 days)
Is it possible to manipulate the parameter of a naive bayes structure createt by NaiveBayes.fit()? I've tried, but it didn't work:
EDU>> cls.prior = [0.5 0.5]
Error using NaiveBayes/subsasgn (line 9)
The NaiveBayes class does not support subscripted assignments.

  0 Comments

Sign in to comment.

Accepted Answer

Shashank Prasanna
Shashank Prasanna on 12 Aug 2014
Edited: Shashank Prasanna on 12 Aug 2014
You can change the prior before the model is fit. If you want to specify different prior, you can do that while calling NaiveBayes.fit or fitNaiveBayes function using the name value pairs:

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.