pub fn r_squared(y_true: &[f64], residuals: &[f64]) -> f64
Compute R² (coefficient of determination).