Return a regularized fit to a linear regression model.
Parameters: | method : string
alpha : scalar or array-like
L1_wt: scalar :
start_params : array-like
profile_scale : bool
refit : bool
|
---|---|
Returns: | An array of coefficients, or a RegressionResults object of the : same type returned by ``fit``. : |
Notes
The elastic net approach closely follows that implemented in the glmnet package in R. The penalty is a combination of L1 and L2 penalties.
The function that is minimized is: ..math:
0.5*RSS/n + alpha*((1-L1_wt)*|params|_2^2/2 + L1_wt*|params|_1)
where RSS is the usual regression sum of squares, n is the sample size, and |*|_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:
References
Friedman, Hastie, Tibshirani (2008). Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software 33(1), 1-22 Feb 2010.