pub fn concordance_correlation<F, S1, S2, D1, D2>(
y_true: &ArrayBase<S1, D1>,
y_pred: &ArrayBase<S2, D2>,
) -> Result<F>Expand description
Calculates the concordance correlation coefficient (CCC)
The concordance correlation coefficient measures the agreement between two variables and is a measure of both precision and accuracy.
§Arguments
y_true- Ground truth (correct) target valuesy_pred- Estimated target values
§Returns
- The concordance correlation coefficient
§Examples
use scirs2_core::ndarray::array;
use scirs2_metrics::regression::concordance_correlation;
let y_true = array![3.0, -0.5, 2.0, 7.0];
let y_pred = array![2.5, 0.0, 2.0, 8.0];
let ccc = concordance_correlation(&y_true, &y_pred).unwrap();
assert!(ccc > 0.9);