Learn R Programming

MachineShop (version 3.3.0)

NaiveBayesModel: Naive Bayes Classifier Model

Description

Computes the conditional a-posterior probabilities of a categorical class variable given independent predictor variables using Bayes rule.

Usage

NaiveBayesModel(laplace = 0)

Arguments

laplace

positive numeric controlling Laplace smoothing.

Value

MLModel class object.

Details

Response types:

factor

Further model details can be found in the source link below.

See Also

naiveBayes, fit, resample

Examples

Run this code
# NOT RUN {
## Requires prior installation of suggested package e1071 to run

fit(Species ~ ., data = iris, model = NaiveBayesModel)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab