sgt: Soft Graphical Thresholding Algorithm

Description Usage Arguments Details Value Note References Examples

View source: R/GGM.R

Description

Estimates a sparse inverse covariance matrix using the closed form solution of graphical lasso under acyclic graph structure.

Usage

1
sgt(x, lambda, size = NULL)

Arguments

x

There are 2 options: (1) x is an n by p data matrix; (2) a p by p sample covariance matrix. The program automatically identifies the input matrix by checking the symmetry. (n is the sample size and p is the dimension.)

lambda

The regularization parameter for graphical lasso.

size

A non-negative integer for determining the model size, i.e., the number of non-zero off-diagonal entries in the upper-triangular precision matrix, which is also the number of edges in the graph. size must range from 0 to (p^2 - p) / 2.

Details

Soft Graphical Thresholding (SGT) algorithm proceeds by thresholding the sample covariance matrix and estimating the inverse covariance matrix with a closed-form formula. If the graph structure detected by the thresholding procedure is acyclic, then the estimation is equivalent to the solution of graphical lasso.

Value

A list with following components:

Omega

Estimated inverse covariance matrix.

active.entry

The position of the non-zero entries of Omega.

is.acyclic

The boolean flag of whether the detected graph structure is acyclic or not.

Note

Either lambda or size should specified when function sgt is called. If both arguments are given, only lambda would be considered.

References

Fattahi, Salar, and Somayeh Sojoudi. Graphical Lasso and Thresholding: Equivalence and Closed-form Solutions. Journal of Machine Learning Research 20.10 (2019): 1-44. doi: 10.5555/3322706.3322716

Examples

1
2
3
4
library(gif)

data("ar1")
res <- sgt(ar1[["x"]], lambda = 0.01)

gif documentation built on July 1, 2020, 8:53 p.m.