powered by
Get f1 / mcc and other accuracy measurements for binary predictions. Provide either an estimate and reference vector e.g. getF1mcc(estimate, reference) Or TPs, FPs, etc. e.g. getF1mcc(tps=3, fps=4, tns=7, fns=2)
getF1mcc( estimate = NULL, reference = NULL, tps = NULL, fps = NULL, tns = NULL, fns = NULL )
A vector with sensitivity, specificity, fpr, fdr, f1, agreement, p.value, mcc, and mcc.p
A binary vector of predictions
a binary vector of actual values
The number of TPs
The number of FPs
The number of TNs
The number of FNs
estimates <- sample(c(runif(8), 0 ,0)) reference <- sample(c(runif(7), 0 , 0, 0)) accuracyStats <- getF1mcc(estimate=estimates>0, reference=reference>0)
Run the code above in your browser using DataLab