sugm(data, lambda = NULL, nlambda = NULL, lambda.min.ratio = NULL,
rho = NULL, method = "tiger", sym = "or", shrink=NULL,
prec = 1e-4, max.ite = 1e4, standardize = FALSE,
perturb = TRUE, verbose = TRUE)
"clime"
: (1) data
is an n
by d
data matrix (2) a d
by d
sample covariance matrix. The program automatically identifies the input matrix by checking the slambda = NULL
and have the program compute its own lambda
sequence based on nlambda
and lambda.min.rat
lambda
. Default value is 5.lambda
, as a fraction of the uppperbound (lambda.max
) of the regularization parameter. The program can automatically generate lambda
as a sequence of length = nlambda
starting fromclime
. The default value is $\sqrt{d}$."tiger"
is applied if method = "tiger"
and "clime"
is applied if method="clime"
. Default value is "tiger"
.sym = "and"
, the edge between node i
and node j
is selected ONLY when both node i
and node j
are selected as neighbors for each other. If sym = "or"
method = "clime"
and the default value is 0 if method="tiger"
.standardize = TRUE
. The default value is FALSE
.Sigma
is added by a positive value to guarantee that Sigma
is positive definite if perturb = TRUE
. User can specify a numeric value for perturbe
. The default value is perturb = TRUE
verbose = FALSE
. The default value is TRUE
."sugm"
is returned:n
by d
data matrix or d
by d
sample covariance matrix from the input.lambda
used in the program.lambda
.d
by d
precision matrices corresponding to regularization parameters.sym
from the input.method
from the input.d
by d
adjacency matrices of estimated graphs as a graph path corresponding to lambda
.method = "clime"
, it is a list of two matrices where ite[[1]] is the number of external iterations and ite[[2]] is the number of internal iterations with the entry of (i,j) as the number of iteration of i-th column and j-th lambda. If method="tiger"
, it is a matrix of iteration with the entry of (i,j) as the number of iteration of i-th column and j-th lambda.d
by nlambda
matrix. Each row contains the number of nonzero coefficients along the lasso solution path.standardize
from the input.perturb
from the input.verbose
from the input."tiger"
solves the following minimization problem
$$\min ||X-XB||_{2,1} + \lambda ||B||_1 \quad \textrm{s.t. } B_{jj} = 0,$$
where $||\cdot||_{1}$ and $||\cdot||_{2,1}$ are element-wise 1-norm and $L_{2,1}$-norm respectively.
flare-package
, sugm.generator
, sugm.select
, sugm.plot
, sugm.roc
, plot.sugm
, plot.select
, plot.roc
, plot.sim
, print.sugm
, print.select
, print.roc
and print.sim
.## load package required
library(flare)
## generating data
n = 50
d = 50
D = sugm.generator(n=n,d=d,graph="band",g=1)
plot(D)
## sparse precision matrix estimation with method "clime"
out1 = sugm(D$data, method = "clime")
plot(out1)
sugm.plot(out1$path[[4]])
## sparse precision matrix estimation with method "tiger"
out2 = sugm(D$data, method = "tiger")
plot(out2)
sugm.plot(out2$path[[5]])
Run the code above in your browser using DataLab