pub fn fit(
family: Family,
x: &[f64],
y: &[f64],
n: usize,
p: usize,
fit_intercept: bool,
) -> Result<GlmModel, LearningError>Expand description
Fit a GLM of y (length n) on a row-major n × p predictor matrix by IRLS.
fit_intercept prepends a constant column. Fails closed: InvalidDimension,
InsufficientData (n ≤ params), Singular (collinear / perfectly separated),
NotConverged.