compare | R Documentation |
Compare predictions and labels
compare(
predictions,
labels,
partition = TRUE,
names = c(specificity = 0, sensitivity = 1)
)
predictions |
(numeric | character) |
labels |
(numeric | character) |
partition |
(logical) |
names |
(character | NULL) |
(list | matrix)
list of matrices (one for each unique value of labels
) with
values 1 (correct prediction) and 0 (false prediction).
If partition=TRUE
, the matrices are combined in a single matrix with rbind
.
pred <- matrix(c(1, 1, 0), 5, 3)
labels <- c(1, 1, 0, 0, 1)
compare(pred, labels, FALSE)
compare(pred, labels, TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.