calculate_mcc_f1 | R Documentation |
Given binary observed and predicted response, estimate Matthews correlation coefficient (MCC) and the F1 score.
calculate_mcc_f1(observed, predicted)
observed |
logical or 0/1; the observed binary response. |
predicted |
logical or 0/1; the predicted binary response. This will typically need to be generated by applying a threshold to the continuous predicted response. |
A list with two elements: mcc
and f1
.
obs <- c(rep(1L, 1000L), rep(0L, 10000L))
pred <- c(rbeta(300L, 12, 2), rbeta(700L, 3, 4), rbeta(10000L, 2, 3))
calculate_mcc_f1(obs > 0, pred > 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.