statsmodels.regression.mixed_linear_model.MixedLM.fit_regularized

MixedLM.fit_regularized(start_params=None, method='l1', alpha=0, ceps=0.0001, ptol=1e-06, 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:
  • method (string of Penalty object) – Method for regularization. If a string, must be ‘l1’.
  • alpha (array-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.
  • ceps (positive real scalar) – Fixed effects parameters smaller than this value in magnitude are treaded as being zero.
  • ptol (positive real scalar) – Convergence occurs when the sup norm difference between successive values of fe_params is less than ptol.
  • maxit (integer) – The maximum number of iterations.
  • fit_kwargs (keywords) – Additional keyword arguments passed to fit.
Returns:
Return type:

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 L1-penalized 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

© 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.regression.mixed_linear_model.MixedLM.fit_regularized.html