pearson_cc()¶
- audmetric.pearson_cc(truth, prediction)[source]¶
Pearson correlation coefficient.
where is the standard deviation, and is the covariance.
- Parameters:
truth (
Sequence[float]) – ground truth valuesprediction (
Sequence[float]) – predicted values
- Return type:
float- Returns:
pearson correlation coefficient
- Raises:
ValueError – if
truthandpredictiondiffer in length
Examples
>>> pearson_cc([0, 1, 2], [0, 1, 1]) 0.8660254037844385