statsmodels.regression.mixed_linear_model.MixedLM.fit_regularized¶
method

MixedLM.
fit_regularized
(start_params=None, method='l1', alpha=0, ceps=0.0001, ptol=1e06, maxit=200, **fit_kwargs)[source]¶ Fit a model in which the fixed effects parameters are penalized. The dependence parameters are held fixed at their estimated values in the unpenalized model.
 Parameters
 methodstring of Penalty object
Method for regularization. If a string, must be ‘l1’.
 alphaarray_like
Scalar or vector of penalty weights. If a scalar, the same weight is applied to all coefficients; if a vector, it contains a weight for each coefficient. If method is a Penalty object, the weights are scaled by alpha. For L1 regularization, the weights are used directly.
 cepspositive real scalar
Fixed effects parameters smaller than this value in magnitude are treaded as being zero.
 ptolpositive real scalar
Convergence occurs when the sup norm difference between successive values of fe_params is less than ptol.
 maxitinteger
The maximum number of iterations.
 fit_kwargskeywords
Additional keyword arguments passed to fit.
 Returns
 A MixedLMResults instance containing the results.
Notes
The covariance structure is not updated as the fixed effects parameters are varied.
The algorithm used here for L1 regularization is a”shooting” or cyclic coordinate descent algorithm.
If method is ‘l1’, then fe_pen and cov_pen are used to obtain the covariance structure, but are ignored during the L1penalized fitting.
References
Friedman, J. H., Hastie, T. and Tibshirani, R. Regularized Paths for Generalized Linear Models via Coordinate Descent. Journal of Statistical Software, 33(1) (2008) http://www.jstatsoft.org/v33/i01/paper
http://statweb.stanford.edu/~tibs/stat315a/Supplements/fuse.pdf