Reduce size of naive Bayes classifier
returns a
compact naive Bayes classifier (CMdl
= compact(Mdl
)CMdl
), the compact version of
the trained naive Bayes classifier Mdl
.
CMdl
is a CompactClassificationNaiveBayes
object.
CMdl
does not contain the training data, whereas
Mdl
contains the training data in its X
and Y
properties. Therefore, although you can predict class
labels using CMdl
, you cannot perform tasks such as
cross-validation with the compact naive Bayes classifier.
ClassificationNaiveBayes
| CompactClassificationNaiveBayes
| fitcnb
| predict