concordance_cc()¶
- audmetric.concordance_cc(truth, prediction, *, ignore_nan=False)[source]¶
Concordance correlation coefficient.
where is the Pearson correlation coefficient, the mean and the variance.1
- 1
Lawrence I-Kuei Lin. A concordance correlation coefficient to evaluate reproducibility. Biometrics, 45:255–268, 1989. doi:10.2307/2532051.
- Parameters
truth (
Sequence
[float
]) – ground truth valuesprediction (
Sequence
[float
]) – predicted valuesignore_nan (
bool
) – ifTrue
all samples that containNaN
intruth
orprediction
are ignored
- Return type
float
- Returns
concordance correlation coefficient
- Raises
ValueError – if
truth
andprediction
differ in length
Examples
>>> concordance_cc([0, 1, 2], [0, 1, 1]) 0.6666666666666665