Function linreg::linear_regression_of [−][src]
pub fn linear_regression_of<X, Y, F>(xys: &[(X, Y)]) -> Option<(F, F)> where
X: Clone + Into<F>,
Y: Clone + Into<F>,
F: Float,
Linear regression from tuples
Calculates the linear regression from a slice of tuple values.
Returns None if
xorytuple members do not have a mean (e.g. if they are empty, seeIteratorMeanfor details)- the slope is too steep to represent, approaching infinity
Returns Some(slope, intercept) of the regression line.