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]
- Parameters:
truth (
Sequence[float]) – ground truth valuesprediction (
Sequence[float]) – predicted valuesignore_nan (
bool) – ifTrueall samples that containNaNintruthorpredictionare ignored
- Return type:
float- Returns:
concordance correlation coefficient
- Raises:
ValueError – if
truthandpredictiondiffer in length
Examples
>>> concordance_cc([0, 1, 2], [0, 1, 1]) 0.6666666666666665