glmnet v3.0-1

0

Monthly downloads

0th

Percentile

Lasso and Elastic-Net Regularized Generalized Linear Models

Extremely efficient procedures for fitting the entire lasso or elastic-net regularization path for linear regression, logistic and multinomial regression models, Poisson regression and the Cox model. Two recent additions are the multiple-response Gaussian, and the grouped multinomial regression. The algorithm uses cyclical coordinate descent in a path-wise fashion, as described in the papers listed in the URL below.

Readme

Lasso and Elastic-Net Regularized Generalized Linear Models

CRAN\_Status\_Badge

We provide extremely efficient procedures for fitting the entire lasso or elastic-net regularization path for linear regression (gaussian), multi-task gaussian, logistic and multinomial regression models (grouped or not), Poisson regression and the Cox model. The algorithm uses cyclical coordinate descent in a path-wise fashion. Details may be found in Friedman, Hastie, and Tibshirani (2010), Simon et al. (2011), Tibshirani et al. (2012), Simon, Friedman, and Hastie (2013).

Version 3.0 is a major release with several new features, including:

  • Relaxed fitting to allow models in the path to be refit without regularization. CV will select from these, or from specified mixtures of the relaxed fit and the regular fit;
  • Progress bar to monitor computation;
  • Assessment functions for displaying performance of models on test data. These include all the measures available via cv.glmnet, as well as confusion matrices and ROC plots for classification models;
  • print methods for CV output;
  • Functions for building the x input matrix for glmnet that allow for one-hot-encoding of factor variables, appropriate treatment of missing values, and an option to create a sparse matrix if appropriate.
  • A function for fitting unpenalized a single version of any of the GLMs of glmnet.

References

Friedman, Jerome, Trevor Hastie, and Rob Tibshirani. 2010. “Regularization Paths for Generalized Linear Models via Coordinate Descent.” Journal of Statistical Software, Articles 33 (1): 1–22. https://doi.org/10.18637/jss.v033.i01.
Simon, Noah, Jerome Friedman, and Trevor Hastie. 2013. “A Blockwise Descent Algorithm for Group-Penalized Multiresponse and Multinomial Regression.”
Simon, Noah, Jerome Friedman, Trevor Hastie, and Rob Tibshirani. 2011. “Regularization Paths for Cox’s Proportional Hazards Model via Coordinate Descent.” Journal of Statistical Software, Articles 39 (5): 1–13. https://doi.org/10.18637/jss.v039.i05.
Tibshirani, Robert, Jacob Bien, Jerome Friedman, Trevor Hastie, Noah Simon, Jonathan Taylor, and Ryan J. Tibshirani. 2012. “Strong Rules for Discarding Predictors in Lasso-Type Problems.” Journal of the Royal Statistical Society: Series B (Statistical Methodology) 74 (2): 245–66. https://doi.org/10.1111/j.1467-9868.2011.01004.x.

Functions in glmnet

Name Description
Cindex compute C index for a Cox model
beta_CVX Simulated data for the glmnet vignette
deviance.glmnet Extract the deviance from a glmnet object
coxgrad compute gradient for cox model
glmnet-package Elastic net model paths for some generalized linear models
na.replace Replace the missing entries in a matrix columnwise with the entries in a supplied vector
predict.cv.glmnet make predictions from a "cv.glmnet" object.
plot.glmnet plot coefficients from a "glmnet" object
print.cv.glmnet print a cross-validated glmnet object
plot.cv.glmnet plot the cross-validation curve produced by cv.glmnet
coef.glmnet Extract coefficients from a glmnet object
glmnet.control internal glmnet parameters
rmult Generate multinomial samples from a probability matrix
print.glmnet print a glmnet object
glmnet.measures Display the names of the measures used in CV for different "glmnet" families
glmnet fit a GLM with lasso or elasticnet regularization
makeX convert a data frame to a data matrix with one-hot encoding
bigGlm fit a glm with all the options in glmnet
glmnet-internal Internal glmnet functions
cv.glmnet Cross-validation for glmnet
coxnet.deviance compute deviance for cox model output
assess.glmnet assess performace of a 'glmnet' object using test data.
No Results!

Vignettes of glmnet

Name
assets/coxnet.RDS
assets/glmnet_refs.bib
Coxnet.Rmd
glmnet.Rmd
relax.Rmd
No Results!

Last month downloads

Details

Type Package
Date 2019-11-14
License GPL-2
VignetteBuilder knitr
Encoding UTF-8
URL https://glmnet.stanford.edu, https://dx.doi.org/10.18637/jss.v033.i01, https://dx.doi.org/10.18637/jss.v039.i05
RoxygenNote 6.1.1
NeedsCompilation yes
Packaged 2019-11-14 21:01:50 UTC; hastie
Repository CRAN
Date/Publication 2019-11-15 06:50:04 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/glmnet)](http://www.rdocumentation.org/packages/glmnet)