This package provides regularization paths for the lasso, (fitted) group lasso, and (fitted) sparse-group lasso. The underlying mathematical model is a mixed model, i.e., a model with fixed and random effects. (Whereas it is actually optional to include any fixed effect.)
The (fitted) sparse-group lasso contains two penalty terms, which are
combined via a mixing parameter 0 <= alpha <= 1
. Thus, if the
parameter is set to either 1
or 0
, the resulting regularization
operator is the lasso or the (fitted) group lasso, respectively.
Key features:
The lasso, (fitted) group lasso, and sparse-group lasso are implemented via proximal gradient descent.
The fitted sparse-group lasso (fitSGL) is implemented via proximal-averaged gradient descent.
By default, a grid search for the penalty parameter lambda
is
performed. Warm starts are implemented to effectively accelerate
this procedure.
The step size between consecutive iterations is automatically determined via backtracking line search - except for the fitSGL, which needs a fixed step size to be provided upon its call.
To get the current release version from CRAN, please type:
install.packages("seagull")
To get the current development version from github, please type:
# install.packages("devtools")
devtools::install_github("jklosa/seagull")
A data set is included and can be loaded:
data("seagull_data")
Furthermore, the following functions are available to the user:
seagull
lambda_max__lasso
lambda_max_group_lasso
lambda_max_fitted_group_lasso
lambda_max_sparse_group_lasso
Please load the data as shown in the section above and get started:
## Call the lasso:
fit_l <- seagull(y = phenotypes[, 1], Z = genotypes, alpha = 1)
## Call the group lasso:
fit_gl <- seagull(y = phenotypes[, 1], Z = genotypes, groups = groups, alpha = 0)
## Call the sparse-group lasso:
fit_sgl <- seagull(y = phenotypes[, 1], Z = genotypes, groups = groups)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.