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 G overlapping groups. A G * G integer matrix whose (i,j) entry is 1 if and only if i\neq j and g_i is a child group (subset) of g_j, and is 0 otherwise.

groups_var

Required by sox() and sox_cv() to describe the relationship between the G overlapping groups and the p variables. A p * G integer matrix whose (i,j) entry is 1 if and only if variable i is in group g_j, but not in any child group of g_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.1 Index]