Description Usage Arguments Details Value Examples
Run a Naive Bayes Classifier given training data (and optional test data).
1 | naiveBayesClassifier(train, labels, classes, test = NULL)
|
train |
A matrix of training data values |
labels |
An integer vector of target (class) labels, with the same length as the training data set |
classes |
An integer with the given number of classes |
test |
An optional test set, with the same number of columns as the test set. |
This function uses a train set matrix and vector of target labels to run a naive Bayes classifier for an externally given nummber of class. If an optional test data set is supplied, it will be evaluated given the estimates from the initial test set.
A list with several components: means of training data means, variance of training data variances, probanbilities of training data class probabilities. If a test data set was supplied an estimated classification vector is also returned.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.