Description Usage Arguments Details Value Author(s) Examples
This is a function to estimate parameters of some variants of naive Bayes model: gaussian and multinomial.
1 | naive.bayes(x, ct)
|
x |
is the dataset |
ct |
is a string that labels the categorical variable that classifies the instances into groups |
This function provides maximum likelihood estimates of the naive Bayes classifier. It models qualitative features and discrete and continous quantitative features. WARNING: qualitative/discrete features must be represented by factor
atomic class and the number of levels of the factor
is the number of parameters of the multinomial. Moreover, it must be used atomic class numeric
for the real valued features. The function allows that the user includes as input qualitative/discrete and continuous features at the same time. Gaussian distribution is used for real valued features and multinomial for qualitative/discrete features.
The output is an object of class nb
that contains maximum likelihood estimates of model.
par |
a list with maximum likelihood estimates of parameters |
est.pi |
the estimates of prior probabilities of categories |
ncat |
number of categories |
ct |
is a string that labels the categorical variable that classifies the instances into group |
Renato Rodrigues Silva, renato.rrsilva@ufg.br
1 2 3 | data(seeds)
mod = naive.bayes(x=seeds, ct="varieties")
mod
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.