sgdnet is an R-package that fits elastic net-regularized generalized linear models to big data using the incremental gradient average algorithm SAGA (Defazio et al. 2014).
sgdnet is not currently available on CRAN but can be installed using the devtools package:
It is simple to fit a model using sgdnet. The interface deliberately mimics that of glmnet to facilitate transitioning between the two.
First we load the package, and then we fit a multinomial model to the iris data set. We set the elastic net penalty to 0.8 using the alpha
argument to achieve a compromise between the ridge and lasso penalties.
sgdnet fits the model across an automatically computed regularization path. Altneratively, the user might supply their own path using the lambda
argument.
library(sgdnet)
fit <- sgdnet(iris[, 1:4], iris[, 5], family = "multinomial", alpha = 0.8)
plot(fit)
sgdnet is open source software, licensed under GPL-3.
sgdnet uses semantic versioning.
The initial work on sgdnet was supported by Google through the Google Summer of Code program with Michael Weylandt and Toby Dylan Hocking as mentors.