Skip to main content

simple_linear_regression

Function simple_linear_regression 

Source
pub fn simple_linear_regression(
    x: &[f64],
    y: &[f64],
) -> Option<LinearRegression>
Expand description

Simple linear regression of y on x. None if the lengths differ, n < 3 (need n−2 ≥ 1 residual degrees of freedom for inference), or x has zero variance (slope undefined).