Estimates a sparse inverse covariance matrix using the closed form solution of graphical lasso under acyclic graph structure.
sgt(x, lambda, size = NULL)
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.
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.)
The regularization parameter for graphical lasso.
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\).
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.
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
library(gif)
data("ar1")
res <- sgt(ar1[["x"]], lambda = 0.01)
Run the code above in your browser using DataLab