This function calculates the total MML score of the Naive Bayes model. It is derived from the general MML87 formula, but for Naive Bayes only. The parameters used are not MML estimations but maximum likelihood estimations due to simplicity. The current version only works with binary variables. The free parameter of a variable is the first value (or level) appeared in all values (or levels) sorted by alphabetic order.
1 |
data |
A given data set. |
probSign |
A data frame with 1 and -1, which corresponds to the 1st and 2nd level of a varaible. It is used for computing the FIM of Naive Bayes. |
vars |
A vector of all variables. |
arities |
A vector of variables arities. |
sampleSize |
Sample size of a given data set. |
x |
A vector of input variables. |
y |
The output variable. |
debug |
A boolean variable to display each part of the MML score. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.