[R-pkgs] Package glmnetUtils now on CRAN

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[R-pkgs] Package glmnetUtils now on CRAN

Heinzen, Ethan P. via R-packages
I'm pleased to announce that the glmnetUtils package is now available on CRAN. I wrote this after using the popular glmnet package to fit elastic net models for a few customer projects, and rewriting the same boilerplate code each time.

glmnetUtils provides some quality-of-life improvements for glmnet, specifically:

- a formula/data frame interface to glmnet and cv.glmnet. No more manual fiddling around with model.matrix/as.matrix/data.matrix, worrying about NA values, etc.
- a cva.glmnet function to choose both the alpha and lambda parameters via cross-validation, following the approach described in the help page for cv.glmnet. Optionally does the cross-validation in parallel.
- Methods for predict and coef for the above.

In addition, to facilitate analysis of very wide datasets, glmnetUtils by default takes a slightly different approach to generating model matrices. Rather than calling model.frame() and model.matrix() on the full dataset, it builds up the model.matrix term by term. This is because model.frame() creates a terms object, which can be excessively large for wide data. Building up the model matrix one term at a time avoids this problem.

CRAN link: https://cran.r-project.org/package=glmnetUtils

Github repo: https://github.com/hong-revo/glmnetUtils

Please feel free to contact me with suggestions, bug reports, criticisms, etc.

_______________________________________________
R-packages mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-packages

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.