Learn R Programming

dpglasso (version 1.0)

box_qp_f: box constrained Quadratic Program (QP)

Description

box_qp_f solves the minimization problem $$\mathrm{minimize}_{u}\;\; (b +u)' Q (b + u );\;\; \mathrm{subject\;\; to}\;\; \|u\|_\infty \leq \rho$$ where $Q_{m \times m}$ is symmetric PSD, $u,b \in \Re^m$. The algorithm used is one-at-a-time cyclical coordinate descent.

Usage

box_qp_f(Q, u, b, rho, Maxiter, tol = 10^-4)

Arguments

Q
(Required) is a symmetric PSD matrix of dimension $m \times m$. This is a problem parameter.
u
(Required) is the optimization variable, a vector of length m. The value of u serves as an initialization for the coordinate-wise algorithm.

If a suitable starting point is unavailable, start with u = 0

b
(Required) is a vector of length m, this is a problem parameter.
rho
(Required) is the degree of shrinkage. This is a non-negative scalar.
Maxiter
(Required) is an integer denoting the maximum number of iterations (full sweeps across all the m variables), to be performed by box_qp_f.
tol
is the convergence tolerance. It is a real positive number (defaults to 10^-4). box_qp_f converges if the relative difference of the objective values is less than tol.

Value

  • uthe optimal value of the argument u, upon convergence
  • grad_vecthe gradient of the objective function at u

Details

This box QP function is a R wrapper to a Fortran code. This is primarily meant to be called from the R function dpglasso. One needs to be very careful (as in supplying the inputs of the progra properly) while using this as a stand alone program.

References

This algorithm is used as a part of the algorithm DPGLASSO described in our paper: ``The Graphical Lasso: New Insights and Alternatives by Rahul Mazumder and Trevor Hastie" available at http://arxiv.org/abs/1111.5479

Examples

Run this code
set.seed(2008)

# create problem data

m<-20;
aa<-array(rnorm(m^2),dim=c(m,m));
Q<-aaQ<- Q + diag(rep(0.1,m));

b<-rnorm(m);

soln<-box_qp_f(Q, u=rep(0,m), b, rho=.2 , Maxiter=1000, tol = 10^-4)

Run the code above in your browser using DataLab