Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Classification margins for naive Bayes classifiers

`m = margin(Mdl,tbl,ResponseVarName)`

`m = margin(Mdl,tbl,Y)`

`m = margin(Mdl,X,Y)`

returns the classification margins
(`m`

= margin(`Mdl`

,`tbl`

,`ResponseVarName`

)`m`

) for the trained naive Bayes classifier
`Mdl`

using the predictor data in table `tbl`

and the class labels in `tbl.ResponseVarName`

.

`ClassificationNaiveBayes`

| `CompactClassificationNaiveBayes`

| `edge`

| `fitcnb`

| `loss`

| `predict`