overlapgglasso: Group-lasso with overlapping groups

Description Usage Arguments Details Value Source See Also Examples

View source: R/overlap.R

Description

Group-lasso with overlapping groups

Usage

1
2
overlapgglasso(X, y, var, group, lambda = NULL, weight = NULL,
  intercept = TRUE, ...)

Arguments

X

matrix of size n*p

y

vector of size n

var

vector containing the variable to use

group

vector containing the associated groups

lambda

lambda values for group lasso. If not provided, the function generates its own values of lambda

weight

a vector the weight for each group. Default is the sqaure root of the size of each group

intercept

should an intercept be included in the model ?

...

Others parameters for gglasso function

Details

Use a group-lasso algorithm (see gglasso) to solve a group-lasso with overlapping groups. Each variable j of the original matrix X is paste k(j) times in a new dataset with k(j) the number of different groups containing the variable j. The new dataset is used to solve the group-lasso with overlapping groups running a group-lasso algorithm.

Value

a HCgglasso object containing :

lambda

lambda values

b0

intercept values for lambda

beta

A list containing the values of estimated coefficients for each values of lambda

var

A list containing the index of selected variables for each values of lambda

group

A list containing the values index of selected groups for each values of lambda

nVar

A vector containing the number of non zero coefficients for each values of lambda

nGroup

A vector containing the number of non zero groups for each values of lambda

structure

A list containing 3 vectors. var : all variables used. group : associated groups. weight : weight associated with the different groups.

time

computation time

dim

dimension of X

Source

Laurent Jacob, Guillaume Obozinski, and Jean-Philippe Vert. 2009. Group lasso with overlap and graph lasso. In Proceedings of the 26th Annual International Conference on Machine Learning (ICML '09).

See Also

listToMatrix

Examples

1
2
3
4
5
6
set.seed(42)
X = simuBlockGaussian(50,12,5,0.7)
y = drop(X[,c(2,7,12)]%*%c(2,2,-2)+rnorm(50,0,0.5))
var = c(1:60,1:8,7:15)
group = c(rep(1:12,each=5),rep(13,8),rep(14,9))
res = overlapgglasso(X,y,var,group)

HCgglasso documentation built on May 2, 2019, 4:54 p.m.