Package: glmnet 4.1-8

Trevor Hastie

glmnet: 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, Cox model, multiple-response Gaussian, and the grouped multinomial regression; see <doi:10.18637/jss.v033.i01> and <doi:10.18637/jss.v039.i05>. There are two new and important additions. The family argument can be a GLM family object, which opens the door to any programmed family (<doi:10.18637/jss.v106.i01>). This comes with a modest computational cost, so when the built-in families suffice, they should be used instead. The other novelty is the relax option, which refits each of the active sets in the path unpenalized. The algorithm uses cyclical coordinate descent in a path-wise fashion, as described in the papers cited.

Authors:Jerome Friedman [aut], Trevor Hastie [aut, cre], Rob Tibshirani [aut], Balasubramanian Narasimhan [aut], Kenneth Tay [aut], Noah Simon [aut], Junyang Qian [ctb], James Yang [aut]

glmnet_4.1-8.tar.gz
glmnet_4.1-8.tar.gz(r-4.5-noble)glmnet_4.1-8.tar.gz(r-4.4-noble)
glmnet_4.1-8.tgz(r-4.4-emscripten)glmnet_4.1-8.tgz(r-4.3-emscripten)
glmnet.pdf |glmnet.html
glmnet/json (API)
NEWS

# Install 'glmnet' in R:
install.packages('glmnet', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Uses libs:
  • fortran– Runtime library for GNU Fortran applications
  • c++– GNU Standard C++ Library v3
Datasets:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

14.84 score 72 stars 695 packages 22k scripts 108k downloads 1.6k mentions 24 exports 9 dependencies

Last updated 1 years agofrom:625f6ca6e3. Checks:OK: 1 WARNING: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKOct 01 2024
R-4.5-linux-x86_64WARNINGOct 01 2024

Exports:assess.glmnetbigGlmbuildPredmatCindexcoef.glmnetcoef.relaxedconfusion.glmnetcoxgradcoxnet.deviancecv.glmnetglmnetglmnet.controlglmnet.measuresmakeXna_sparse_fixna.replacepredict.glmnetpredict.relaxedprepareXprint.cv.glmnetrelax.glmnetrmultroc.glmnetstratifySurv

Dependencies:codetoolsforeachiteratorslatticeMatrixRcppRcppEigenshapesurvival

An Introduction to glmnet

Rendered fromglmnet.Rmdusingknitr::rmarkdownon Oct 01 2024.

Last update: 2023-08-22
Started: 2019-11-09

Regularized Cox Regression

Rendered fromCoxnet.Rmdusingknitr::rmarkdownon Oct 01 2024.

Last update: 2021-06-24
Started: 2019-11-09

The family Argument for glmnet

Rendered fromglmnetFamily.Rmdusingknitr::rmarkdownon Oct 01 2024.

Last update: 2021-01-11
Started: 2020-05-14

The Relaxed Lasso

Rendered fromrelax.Rmdusingknitr::rmarkdownon Oct 01 2024.

Last update: 2021-06-24
Started: 2019-11-09

Readme and manuals

Help Manual

Help pageTopics
Elastic net model paths for some generalized linear modelsglmnet-package
assess performance of a 'glmnet' object using test data.assess.glmnet confusion.glmnet roc.glmnet
Simulated data for the glmnet vignettebeta_CVX x y
fit a glm with all the options in 'glmnet'bigGlm
Synthetic dataset with binary responseBinomialExample
compute C index for a Cox modelCindex
Extract coefficients from a glmnet objectcoef.glmnet coef.relaxed predict.coxnet predict.elnet predict.fishnet predict.glmnet predict.lognet predict.mrelnet predict.multnet predict.relaxed
Elastic net objective function value for Cox regression modelcox_obj_function
Fit a Cox regression model with elastic net regularization for a single value of lambdacox.fit
Fit a Cox regression model with elastic net regularization for a path of lambda valuescox.path
Synthetic dataset with right-censored survival responseCoxExample
Compute gradient for Cox modelcoxgrad
Compute deviance for Cox modelcoxnet.deviance
Cross-validation for glmnetcv.glmnet
Elastic net deviance valuedev_function
Extract the deviance from a glmnet objectdeviance.glmnet
Solve weighted least squares (WLS) problem for a single lambda valueelnet.fit
Helper function for Cox deviance and gradientfid
Get lambda max for Cox regression modelget_cox_lambda_max
Helper function to get etas (linear predictions)get_eta
Get null deviance, starting mu and lambda maxget_start
fit a GLM with lasso or elasticnet regularizationglmnet relax.glmnet
internal glmnet parametersglmnet.control
Fit a GLM with elastic net regularization for a single value of lambdaglmnet.fit
Display the names of the measures used in CV for different "glmnet" familiesglmnet.measures
Fit a GLM with elastic net regularization for a path of lambda valuesglmnet.path
convert a data frame to a data matrix with one-hot encodingmakeX
Synthetic dataset with multiple Gaussian responsesMultiGaussianExample
Synthetic dataset with multinomial responseMultinomialExample
Helper function to fit coxph model for survfit.coxnetmycoxph
Helper function to amend ... for new data in survfit.coxnetmycoxpred
Replace the missing entries in a matrix columnwise with the entries in a supplied vectorna.replace
Elastic net objective function valueobj_function
Elastic net penalty valuepen_function
plot the cross-validation curve produced by cv.glmnetplot.cv.glmnet plot.cv.relaxed
plot coefficients from a "glmnet" objectplot.glmnet plot.mrelnet plot.multnet plot.relaxed
Synthetic dataset with count responsePoissonExample
make predictions from a "cv.glmnet" object.coef.cv.glmnet coef.cv.relaxed predict.cv.glmnet predict.cv.relaxed
Get predictions from a 'glmnetfit' fit objectpredict.glmnetfit
print a cross-validated glmnet objectprint.cv.glmnet print.cv.relaxed
print a glmnet objectprint.bigGlm print.glmnet print.relaxed
Synthetic dataset with Gaussian responseQuickStartExample
Make response for coxnetresponse.coxnet
Generate multinomial samples from a probability matrixrmult
Synthetic dataset with sparse design matrixSparseExample
Add strata to a Surv objectstratifySurv
Compute a survival curve from a coxnet objectsurvfit.coxnet
Compute a survival curve from a cv.glmnet objectsurvfit.cv.glmnet
Check if glmnet should call cox.pathuse.cox.path
Helper function to compute weighted mean and standard deviationweighted_mean_sd