accuracy | R Documentation |
Compute predictive accuracy.
accuracy(x, y)
x |
A vector of predicted labels. |
y |
A vector of true labels. |
data(car)
nb <- bnc('nb', 'class', car, smooth = 1)
p <- predict(nb, car)
accuracy(p, car$class)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.