powered by
Calculate the Matthews correlation coefficient (MCC) score
mccr(act, pred)
actual values (vector), 1 (positive), or 0 (negative)
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)
Run the code above in your browser using DataLab