pub fn r2(pred: &[f64], truth: &[f64]) -> f64
Coefficient of determination against the mean predictor.