Struct compute::predict::GLM [−][src]
pub struct GLM {
pub family: ExponentialFamily,
pub alpha: f64,
pub tolerance: f64,
pub weights: Option<Vec<f64>>,
// some fields omitted
}
Expand description
Implements a generalized linear model.
Fields
family: ExponentialFamily
alpha: f64
tolerance: f64
weights: Option<Vec<f64>>
Implementations
Create a new general linear model with the given exponential family.
alpha
sets the L2 (ridge regression) regularization strength, and
tolerance
sets the convergence tolerance.
Set the L2 (ridge regression) regularization strength.
Set the convergence tolerance.
Set the sample weights (usually measurement errors).
Set the offsets (usually used in Poisson regression models).
Fit the GLM using the scoring algorithm,
which gives the maximumum likelihood estimate. It performs a maximum of max_iter
iterations.
Note that x
must be a design matrix (i.e., the first column must contain all 1’s).
Return the maximum likelihood estimates for the parameters.
Calculates the Akaike information criterion for the model.
Calculates the Bayesian information criterion for the model.
Calculates the dispersion of the model.
Returns the fitted covariance for the estimated parameters.
Returns the estimated standard errors on the estimated parameters. This is equivalent to the square root of the diagonals of the covariance matrix.
Use the fitted model to make predictions on some new data.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GLM
impl UnwindSafe for GLM
Blanket Implementations
Mutably borrows from an owned value. Read more