overlap_structure {sox}R Documentation

Automatically generate objects used to describe the structure of the overlapping group lasso penalty

Description

Automatically generate objects used to describe the structure of the overlapping group lasso penalty The output is then used by sox() and sox_cv().

Usage

overlap_structure(group_list)

Arguments

group_list

A list containing the indices of the group members.

Value

A list of objects describing the group structure.

groups

Required by sox() and sox_cv() to describe the relationship between the GG overlapping groups. A GGG * G integer matrix whose (i,j)(i,j) entry is 1 if and only if iji\neq j and gig_i is a child group (subset) of gjg_j, and is 0 otherwise.

groups_var

Required by sox() and sox_cv() to describe the relationship between the GG overlapping groups and the pp variables. A pGp * G integer matrix whose (i,j)(i,j) entry is 1 if and only if variable ii is in group gjg_j, but not in any child group of gjg_j, and is 0 otherwise.

group_weights

Required by sox() and sox_cv() to specify the group-specific penalty weights. The penalty weight for each group is equal to the square root of the group size.

Examples

# p = 9 Variables:
## 1: A1
## 2: A2
## 3: C1
## 4: C2
## 5: B
## 6: A1B
## 7: A2B
## 8: C1B
## 9: C2B

# G = 5 Overlapping groups:
## g1: A1, A2, A1B, A2B
## g2: B, A1B, A2B, C1B, C2B
## g3: A1B, A2B
## g4: C1, C2, C1B, C2B
## g5: C1B, C2B

overlapping.groups <- list(c(1, 2, 6, 7),
                           c(5, 6, 7, 8, 9),
                           c(6, 7),
                           c(3, 4, 8, 9),
                           c(8, 9))
                           
pars.overlapping <- overlap_structure(overlapping.groups)

str(pars.overlapping)
                

[Package sox version 1.2 Index]