Fast Sparse Linear Models for Big Data with SAGA
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
data-raw
data
docs
inst
man
src
tests
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE.md
NAMESPACE
NEWS.md
README.Rmd
README.md
appveyor.yml
codecov.R
codecov.yml
sgdnet.Rproj

README.md

sgdnet

Travis build status AppVeyor build status Coverage status

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).

Installation

sgdnet is not currently available on CRAN but can be installed using the devtools package:

# install.packages("devtools")
devtools::install_github("jolars/sgdnet")

Usage

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 se 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)

The coefficients from a multinomial model along the regularization path fit to the iris data set.

License

sgdnet is open source software, licensed under GPL-3.

Versioning

sgdnet uses semantic versioning.

Acknowledgements

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.