powered by
This function builds a classification model using Naive Bayes.
NB(train, labels, tune = FALSE, ...)
The classification model.
The training set (description), as a data.frame.
data.frame
Class labels of the training set (vector or factor).
vector
factor
If true, the function returns paramters instead of a classification model.
Other parameters.
naiveBayes
require (datasets) data (iris) NB (iris [, -5], iris [, 5])
Run the code above in your browser using DataLab