pub struct ElasticNet<F> { /* private fields */ }
Expand description

Elastic Net model

This struct contains the parameters of a fitted elastic net model. This includes the seperating hyperplane, (optionally) intercept, duality gaps and the number of step needed in the computation.

Model implementation

The coordinate descent algorithm is used to solve the lasso and ridge problem. It optimizes each parameter seperately, holding all the others fixed. This cycles as long as the coefficients have not stabilized or the maximum number of iterations is reached.

See also:

Implementations

View the fitted parameters and make predictions with a fitted elastic net model

Get the fitted hyperplane

Get the fitted intercept, 0. if no intercept was fitted

Get the number of steps taken in optimization algorithm

Get the duality gap at the end of the optimization algorithm

Calculate the Z score

Calculate the confidence level

Create a default parameter set for construction of ElasticNet model

By default, an intercept will be fitted. To disable fitting an intercept, call .with_intercept(false) before calling .fit().

To additionally normalize the feature matrix before fitting, call fit_intercept_and_normalize() before calling fit(). The feature matrix will not be normalized by default.

Create a ridge only model

Create a LASSO only model

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Given an input matrix X, with shape (n_samples, n_features), predict returns the target variable according to elastic net learned from the training data distribution.

Create targets that predict_inplace works with.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.