## S3 method for class 'formula':
NaiveBayes(formula, data, ..., subset, na.action = na.pass)
## S3 method for class 'default':
NaiveBayes(x, grouping, prior, usekernel=FALSE, ...)
class ~ x1 + x2 +
...
. Interactions are not allowed.TRUE
a kernel density estimate (density
)
is used for denstity estimation. If FALSE
a normal density is estimated.density
.NA
s are
found. The default action is not to count them for the
computation of the probability factors. An
alternative is na.omit, which leads to rejection of cas"NaiveBayes"
including components:class
density
.prior
probabilities.
The standard naive Bayes classifier (at least this implementation)
assumes independence of the predictor
variables.predict.NaiveBayes
,code{plot.NaiveBayes},naiveBayes
,qda
data(iris)
m <- NaiveBayes(Species ~ ., data = iris)
Run the code above in your browser using DataLab