getBinaryStat | R Documentation |
Returns TP, TN, FP, FN, sensitivity, specificity, balanced accuracy and accuracy for binary classification task.
getBinaryStat(pred, obs)
pred |
vector of predicted labels (0, 1). |
obs |
vector of observed labels (0, 1). |
names vector contained TP, TN, FP, FN, sensitivity, specificity, balanced accuracy and accuracy.
set.seed(42)
obs <- sample(0:1, 10, TRUE)
pred <- sample(0:1, 10, TRUE)
getBinaryStat(pred, obs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.