Skip to main content

Crate solow_glm

Crate solow_glm 

Source
Expand description

§solow-glm

Generalized linear models: exponential-dispersion Family distributions, Link functions, and the Glm estimator (iteratively reweighted least squares). Validated against an authoritative reference.

use ndarray::{array, Array1};
use solow_glm::{Family, Glm};

// Poisson regression with an intercept.
let x = array![[1.0, 0.0], [1.0, 1.0], [1.0, 2.0], [1.0, 3.0], [1.0, 4.0]];
let y: Array1<f64> = array![1.0, 2.0, 4.0, 7.0, 12.0];
let res = Glm::new(y, x, Family::Poisson).unwrap().fit().unwrap();
assert!(res.converged);

Structs§

GammaRegressor
Fitted Gamma regressor (log link).
Glm
A generalized linear model awaiting estimation.
GlmResults
The fitted result of a Glm.
PoissonRegressor
Fitted Poisson regressor (log link).
TweedieGlm
A Tweedie GLM (log link, power variance V(μ) = μ^p) awaiting estimation.
TweedieRegressor
Fitted Tweedie regressor (log link, p ∈ (1, 2)).

Enums§

Family
An exponential-family error distribution for a GLM.
Link
A link function.