powered by
Compare predictions and labels
compare( predictions, labels, partition = TRUE, names = c(specificity = 0, sensitivity = 1) )
data matrix with values 1 (correct prediction) and 0 (false prediction)
integer, predicted class
integer, true class state (reference standard)
logical, should result be split into one matrix per class (TRUE; default) or not (FALSE)
integer (named), values give data values, names give class names
pred <- matrix(c(1,1,0), 5, 3) labels <- c(1, 1, 0, 0, 1) compare(pred, labels, FALSE) compare(pred, labels, TRUE)
Run the code above in your browser using DataLab