Is there a command in tidymodels that creates a confusion matrix and calculates all the relevant statistics from it (precision, recall, F1, etc.) at the same time? Something similar to confusionMatrix(data = predictions, reference = truth, mode = "prec_recall") in caret? All I've seen from looking around is that the individual statistics have to be calculated using individual commands, but I might have missed things. Thanks!
#Just enter only these 4 figures and these codes will get you all statistics relating two by two table of diagnostic test data
TP <- 20
FP <- 180
FN <- 10
TN <- 210
#odds ratio and confidence interval
mOR <- mepiOR$tab[10] #Odds Ratio
mORCIL <- mepiOR$tab[12]
mORCIU <- mepiOR$tab[14]
mORPValue <-round(mepiOR$tab[16],4)
Yea this works. I was hoping there is a single command that I can use so that R spits out all the commonly seen statistics from a confusion matrix. Something like this below. Thanks anyway
This works for sure, but I'm actually looking for a way to do one line of code and have R spit out all the statistics by itself as opposed to me having to include all that code