gemseo.mlearning.linear_model_fitting.lasso module#

Scikit-learn lasso algorithm.

class Lasso(settings=None)[source]#

Bases: BaseSKLearnLinearModelFitter[Lasso, Lasso_Settings]

Scikit-learn lasso algorithm.

Given the linear model fitting problem presented in this page, this algorithm solves a penalized least squares problem of the form:

\[\min_w \frac{1}{2n}\|Xw-y\|_2^2 + \alpha \|w\|_1, \qquad \alpha \geq 0\]

where \(\|w\|_1\) is the \(\ell_1\)-norm of the coefficients \(w\) and \(\|Xw-y\|_2\) is the \(\ell_2\)-norm of the residual \(Xw-y\).

Initialize self. See help(type(self)) for accurate signature.

Parameters:

settings (SettingsType | None) -- The settings of the linear model fitting algorithm. If None, use a default instance of Settings.

Settings#

alias of Lasso_Settings