Calculates accuracy and related metrics.
calc_accuracy(tabble)
tabble | A frequency table created with |
---|
A tibble with the corresponding statistics
Calculates accuracy, lower and upper bounds, the guessing rate and
p-value of the accuracy vs. the guessing rate. This function is called by
confusion_matrix
, but if this is all you want, you can simply supply
the table to this function.
p = sample(letters[1:4], 250, replace = TRUE, prob = 1:4) o = sample(letters[1:4], 250, replace = TRUE, prob = 1:4) calc_accuracy(table(p, o))#> # A tibble: 1 x 5 #> Accuracy `Accuracy LL` `Accuracy UL` `Accuracy Guessing` `Accuracy P-value` #> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 0.232 0.181 0.289 0.412 1.00