pub fn ols(x: &[f64], y: &[f64]) -> Result<(f64, f64, f64), Error>Expand description
Fit simple OLS and return (intercept, slope, r_squared).
ยงErrors
Returns an error for unequal lengths, fewer than two points, non-finite values, zero x variance, or unrepresentable fitted coefficients.