Function linear_fit

Source
pub fn linear_fit<N>(xs: &[N], ys: &[N]) -> Result<Polynomial<N>, String>
Expand description

Linear least-squares regression

§Errors

Returns an error if the linear fit fails. (xs.len() != ys.len())

§Panics

Panics if a usize can not be transformed into the generic type.