BGL_DC: Basis Graphical Lasso Difference of Convex Algorithm

Description Usage Arguments Details Value Examples

View source: R/BGL_DC.R

Description

Estimates the precision matrix from the basis graphical lasso model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
BGL_DC(
  lambda,
  Phi_Dinv_Phi,
  Phi_Dinv_S_Dinv_Phi,
  guess,
  outer_tol = NULL,
  MAX_ITER = NULL,
  MAX_RUNTIME_SECONDS = NULL,
  verbose = TRUE
)

Arguments

lambda

Penalty be either a nonnegative real, or a matrix of nonnegative reals whose dimension is the same as the number of graph nodes.

Phi_Dinv_Phi

Inner product of basis matrices, Φ'D^{-1}Φ. Typically obtained from using BGLBasisSetup with D = τ^2 I.

Phi_Dinv_S_Dinv_Phi

Inner product of the basis matrices and data, Φ'D^{-1}SD^{-1}Φ. Typically obtained from using BGLBasisSetup with D = τ^2 I. This is where the data directly enters the algorithm. Note: do not compute sample covariance S explicitly. With dat as the n by m matrix with columns corresponding to realizations of the mean zero spatial field, we have S=XX'/m. So, setting D = I for simplicity, we can compute as Φ'SΦ as tcrossprod(crossprod(Phi, dat))/m.

guess

Initial guess for the precision matrix.

outer_tol

Tolerance. Default: NULL.

MAX_ITER

Maximum number of iterations. Default: NULL.

MAX_RUNTIME_SECONDS

Maximum runtime in seconds. Default: NULL.

verbose

Print algorithm details after each iteration. Default: TRUE.

Details

This is the DC algorithm suggested in the paper and is the workhorse of the package. It uses the QUIC algorithm to solve the inner graphical lasso problem which arises after linearizing all concave functions w.r.t Q in the negative log likelihood. D is the covariance matrix of the additive error term epsilon in the model formulation; in the paper D = τ^2 I. The package does not estimate non-identity multiple of D but we include the more general version for possible future research.

Value

Precision matrix of the random coefficients in the weighted sum of basis functions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
basis.setup <- BGLBasisSetup(y=tmin$data,locs=tmin$lon.lat.proj,basis="LatticeKrig", 
     crossvalidation=FALSE,NC=20,nlevel=1)
Phi_Phi <- basis.setup$Phi_Phi
Phi_S_Phi <- basis.setup$Phi_S_Phi
tau_sq <- 2
lambda <- matrix(10,nrow=dim(Phi_Phi)[1],ncol=dim(Phi_Phi)[1])
diag(lambda) <- 0
BGLguess <- BGL_DC(lambda=lambda,Phi_Dinv_Phi=Phi_Phi/tau_sq,
     Phi_Dinv_S_Dinv_Phi=Phi_S_Phi/(tau_sq^2), guess=diag(dim(Phi_Phi)[1]),
     outer_tol=0.05,MAX_ITER=50,MAX_RUNTIME_SECONDS=86400)

mlkrock/BasisGraphicalLasso documentation built on Dec. 21, 2021, 7:59 p.m.