Learn R Programming

bnclassify (version 0.4.8)

accuracy: Compute predictive accuracy.

Description

Compute predictive accuracy.

Usage

accuracy(x, y)

Arguments

x

A vector of predicted labels.

y

A vector of true labels.

Examples

Run this code
 
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