convexity: Compute the local convexity of the objective function.

Description Usage Arguments Details Value Author(s) Examples

Description

convexity computes the minimum eigen value of the Hessian matrix of the penalized weighted least square regression problem.

Usage

1
2
convexity(result, eps = sqrt(.Machine$double.eps),
          eigen.min = 0.001, concave.rm = TRUE)

Arguments

result

a list consists of result from weighted.sparsenet.

eps

Convergence threshhold. The algorithm iterates until the relative change in any coefficient is less than eps. Default is squre root of machine epsilon.

eigen.min

The threshold of the minimum eigen value. When the minimum eigen value is smaller than eigen.min, the minimum eigen value is considered as zero, hence when plug in the optimizer, the minimization problem is locally non-convex. Default is 1e-3.

concave.rm

Logical. If TRUE, when κ goes from 0 to kappa0, the concave solutions and its associated λ values will be removed. If FALSE, when κ goes from 0 to kappa0, all λ will be reserved regardless the convexity of its associated solution. Default is TRUE.

Details

For a specific pair of λ-κ, the (i, j)th entry of the Hessian matrix is computed by x'_iWx_j+\frac{\partial^2∑_{j=1}^pρ(|β_j|\cdot r_{nj};λ, κ)}{\partialβ_i\partialβ_j}, where is a diagonal matrix with ith diagonal elements ω_{ni}.

Value

A list containing λ, κ etc.

lambda

vector of length n_lambda. It contains all the distinct lambda values on the grid.

kappa

vector of length n_kappa. It contains all the distinct kappa values on the grid.

index

A matrix of 4 columns. If concave.rm is TRUE, the number of rows equals the number of λ-κ pairs on the grid at which the solution is convex. If concave.rm is FALSE, the number of rows equals n_lambda \times n_kappa.

Author(s)

Hao Chai <hao.chai@yale.edu>

Examples

1
2
3
4
5
6
X = matrix(rnorm(8000), nrow = 20)
beta0 = c(rep(10, 5), rep(0, 395))
y = rnorm(20) + X %*% beta0
delta = rep(1, 20)
result = weighted.sparsenet(X, y, delta, n_kappa = 40, kappa0 = 0.99)
a = convexity(result)

andrewchay/aft-hd documentation built on May 14, 2019, 8:21 a.m.