mccr {mccr} | R Documentation |
Calculate the Matthews correlation coefficient (MCC) score
mccr(act, pred)
act |
actual values (vector), 1 (positive), or 0 (negative) |
pred |
predict values (vector), 1 (positive), or 0 (negative) |
MCC score
set.seed(18)
act <- abs(round(rnorm(100))) %% 2
pred <- abs(round(rnorm(100))) %% 2
mccr(act, pred)