"NaiveBayes"(formula, data, ..., subset, na.action = na.pass)
"NaiveBayes"(x, grouping, prior, usekernel = FALSE, fL = 0, ...)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.NAs 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 cases
with missing values on any required variable. (NOTE: If
given, this argument must be named.)"NaiveBayes" including components:class density.prior probabilities.
The standard naive Bayes classifier (at least this implementation)
assumes independence of the predictor
variables.
predict.NaiveBayes,plot.NaiveBayes,naiveBayes,qdadata(iris)
m <- NaiveBayes(Species ~ ., data = iris)
Run the code above in your browser using DataLab