Use this function to calculate the MCC values given vectors of TP (true positives), FP (false positives), TN (true negatives), FN (false negatives), P (positives) and N (negatives). Note that the input vectors have to be of the same size and have one-to-one value correspondence for the output MCC vector values to make sense.
calculate_mcc(tp, tn, fp, fn, p, n)
numeric vector of TPs
numeric vector of TNs
numeric vector of FPs
numeric vector of FNs
numeric vector of positives (p = tp + fn)
numeric vector of negatives (n = tn + fp)
a numeric vector of MCC values, each value being in the [-1,1] interval or NaN.
Other confusion matrix calculation functions: calculate_models_mcc
,
calculate_models_synergies_fn
,
calculate_models_synergies_fp
,
calculate_models_synergies_tn
,
calculate_models_synergies_tp