mcc | R Documentation |
Calculates Matthews correlation coefficient (MCC) which is in essence a correlation coefficient between the observed and predicted binary classifications. It has also been generalised to multi-class classification.
mcc(cm)
mcc_multi(cm)
cm |
A contingency table or matrix of predicted vs observed classes with reference classes in columns and predicted classes in rows. |
Use mcc()
for 2x2 tables (binary classification). mcc_multi()
is
for multi-class classification with k x k tables and is calculated using
Gorodkin's method.
Returns a value between -1 and +1. A coefficient of +1 represents a perfect prediction, 0 no better than random prediction and -1 indicates total disagreement between prediction and observation.
Gorodkin, J. (2004). Comparing two K-category assignments by a K-category correlation coefficient. Computational Biology and Chemistry. 28 (5): 367–374.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.