powered by
Compute predictive accuracy.
accuracy(x, y)
A vector of predicted labels.
A vector of true labels.
data(car) nb <- bnc('nb', 'class', car, smooth = 1) p <- predict(nb, car) accuracy(p, car$class)
Run the code above in your browser using DataLab