hsm.path: Solves proximal operator of latent group Lasso over a grid of...

Description Usage Arguments Value See Also Examples

Description

See hsm for the problem that is solved. If lamlist is not provided, a grid of lam values will be constructed starting at lammax, the smallest value of lam for which the solution is completely sparse.

Usage

1
2
3
hsm.path(y, nlam = 20, flmin = 0.01, lamlist = NULL, w = NULL, map, var,
  assign = NULL, w.assign = NULL, get.penalval = FALSE, tol = 1e-08,
  maxiter = 10000)

Arguments

y

Length-p vector used in proximal operator.

nlam

Number of lam values to include in grid. Default value is 20.

flmin

Ratio between the smallest lam and largest lam in grid. Default value is 0.01. Increasing its value will give more sparse solutions.

lamlist

A grid of lam values to use. If this is NULL, then a grid of nlam lam values equally spaced in the logarithm scale between lammax and lammax * flmin are used; otherwise, nlam and flmin are ignored.

w

Length-n.nodes vector of positive values for which w_l gives the weight for g_l, where n.nodes is the number of nodes in DAG. If this is NULL, w_l = sqrt(|g_l|) will be used. Necessary condition is w_l increases with |g_l|.

map

Matrix of n.edges-by-2 dimension, where n.edges is the number of directed edges in DAG. The first column has indices of nodes that edges directing from, whereas the second column gives the indices of nodes the corresponding edges directing towards. If a node indexed i does not have edges linked to it, record the corresponding row as map[i, NA].

var

Length-n.nodes list for which the lth element contains the indices of variables embedded in the lth node.

assign

Matrix of p columns that gives the assignments of variables over different path graphs. Each row of assign corresponds to a path graph decomposed from DAG. If this is NULL, hsm first break down DAG into different path graphs, and then give value to assign afterwards, based on map and var; otherwise, map and var are ignored. Refer to paths for more details.

w.assign

List of length nrow(assign), for which the lth element contains the weights corresponding to the lth row of assign (the lth path graph). For example, if the lth path graph is made up of three nodes indexed with {3, 4, 6, 8}, w.assign[[l]] = {w_3, w_4, w_6, w_8}. If this is NULL, hsm will give value to w.assign, along with assign; otherwise, map and var are ignored. Refer to paths for more details.

get.penalval

If TRUE, lam * Ω(β; w) are computed and returned, otherwise NA is returned.

tol

Tolerance level used in BCD. Convergence is assumed when no parameter of interest in each path graph changes by more than tol in BCD.

maxiter

Upperbound of the number of iterations that BCD to perform.

Value

Returns a sequence of estimates of the solution to the proximal operator of the latent group Lasso. The returned solutions are exact ones if the DAG is a directed path graph.

lamlist

Grid of lam values used.

beta.m

A nlam-by-p matrix where beta.m[i, ] gives the ith solution to the proximal operator, corresponding to the ith lam value in the grid.

penalval.m

Length-nlam vector of values of the penalty lam * Ω(β; w) where penalval.m[i, ] correponds to the ith lam value in the grid, if get.penalval is TRUE. If get.penalval is FALSE, NA is returned.

assign

Value of assign.

w.assign

Value of w.assign.

See Also

hsm

paths

lam.max.hsm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# The following example appears in Figure 7 of Yan & Bien (2015).
# Generate map defining DAG.
map <- matrix(0, ncol=2, nrow=8)
map[1, ] <- c(1,2)
map[2, ] <- c(2,7)
map[3, ] <- c(3,4)
map[4, ] <- c(4,6)
map[5, ] <- c(6,7)
map[6, ] <- c(6,8)
map[7, ] <- c(3,5)
map[8, ] <- c(5,6)
# Assume one parameter per node.
# Let parameter and node share the same index.
var <- as.list(1:8)
set.seed(100)
y <- rnorm(8)
result <- hsm(y=y, lam=0.5, map=map, var=var, get.penalval=TRUE)
result.path <- hsm.path(y=y, map=map, var=var, get.penalval=TRUE)

yanxht/hsm documentation built on May 26, 2019, 6:37 a.m.