GLM.fit_regularized(method='elastic_net', alpha=0.0, start_params=None, refit=False, **kwargs)
[source]
Return a regularized fit to a linear regression model.
Parameters: |
|
---|---|
Returns: | |
Return type: |
An array, or a GLMResults object of the same type returned by |
The penalty is the elastic net
penalty, which is a combination of L1 and L2 penalties.
The function that is minimized is:
where \(|*|_1\) and \(|*|_2\) are the L1 and L2 norms.
Post-estimation results are based on the same data used to select variables, hence may be subject to overfitting biases.
The elastic_net method uses the following keyword arguments:
maxiter : int
L1_wt : float
cnvrg_tol : float
zero_tol : float
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.genmod.generalized_linear_model.GLM.fit_regularized.html