naive_classification_summary {bayesrules} | R Documentation |
Posterior Classification Summaries for a Naive Bayes model
Description
Given a set of observed data including a categorical response variable y and a naiveBayes model of y, this function returns summaries of the model's posterior classification quality. These summaries include a confusion matrix as well as an estimate of the model's overall accuracy.
Usage
naive_classification_summary(model, data, y)
Arguments
model |
a naiveBayes model object with categorical y |
data |
data frame including the variables in the model |
y |
a character string indicating the y variable in data |
Value
a list
Examples
data(penguins_bayes, package = "bayesrules")
example_model <- e1071::naiveBayes(species ~ bill_length_mm, data = penguins_bayes)
naive_classification_summary(model = example_model, data = penguins_bayes, y = "species")
[Package bayesrules version 0.0.2 Index]