confusion_matrix(x, ...)
"confusion_matrix"(x, y, positive, boot = FALSE, boot_samples = 1000L, alpha = 0.05, ...)
"confusion_matrix"(formula, data = parent.frame(), positive, boot = FALSE, boot_samples = 1000L, alpha = 0.05, ...)
is.confusion_matrix(x)
"print"(x, ...)
boot == FALSE
.boot == FALSE
.confusion_matrix
returns a list with elements:
True | ||
Condition | ||
+ | - | Predicted Condition |
+ | TP | FP |
Predicted Condition | - | FN |
TN |
Recall:
test <- c(rep(1, 53), rep(0, 47))
truth <- c(rep(1, 20), rep(0, 33), rep(1, 10), rep(0, 37))
con_mat <- confusion_matrix(test, truth, positive = "1")
str(con_mat)
con_mat
Run the code above in your browser using DataLab