calculate_mcc: Calculate Matthews correlation coefficient vector

Description Usage Arguments Value See Also

View source: R/analysis.R

Description

Use this function to calculate the MCC scores given vectors of TP (true positives), FP (false positives), TN (true negatives) and FN (false negatives) values. Note that the input vectors have to be of the same size and have one-to-one value correspondence for the output MCC vector to make sense.

Usage

1
calculate_mcc(tp, tn, fp, fn)

Arguments

tp

numeric vector of TPs

tn

numeric vector of TNs

fp

numeric vector of FPs

fn

numeric vector of FNs

Value

a numeric vector of MCC values, each value being in the [-1,1] interval. If any of the four sums of the MCC formula are zero, then we return an MCC score of zero, which can be shown to be the correct limiting value (model is no better than a random predictor, see Chicco et al. (2020), doi: 10.1186/s12864-019-6413-7).

See Also

Other confusion matrix calculation functions: calculate_models_mcc(), calculate_models_synergies_fn(), calculate_models_synergies_fp(), calculate_models_synergies_tn(), calculate_models_synergies_tp()


emba documentation built on Jan. 7, 2021, 9:09 a.m.