gemseo.mlearning.linear_model_fitting.elastic_net_cv module#

Scikit-learn elastic net algorithm with built-in cross-validation.

class ElasticNetCV(settings=None)[source]#

Bases: BaseSKLearnLinearModelFitter[ElasticNetCV, ElasticNetCV_Settings]

Scikit-learn elastic net algorithm with built-in cross-validation.

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\left(\rho \|w\|_1 + \frac{1-\rho}{2} \|w\|_2^2\right), \qquad \alpha \geq 0, \qquad \rho\in[0,1],\]

where \(\|w\|_1\) and \(\|w\|_2\) are respectively the \(\ell_1\)- and \(\ell_2\)-norms of the coefficients \(w\), \(\|Xw-y\|_2\) is the \(\ell_2\)-norm of the residual \(Xw-y\). \(\alpha\) and \(\rho\) are estimated by cross-validation.

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 ElasticNetCV_Settings