fastclime: The main solver for fastclime package

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

A fast parametric simplex solver for constrainted l1 minimization approach to sparse precision matrix estimation

Usage

1
fastclime(x, lambda.min = 0.1, nlambda = 50)

Arguments

x

There are 2 options: (1) x 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 symmetry. (n is the sample size and d is the dimension)

lambda.min

This is the smallest value of lambda you would like the solver to explorer. The default value is 0.1. If nlambda is large enough, the precision matrix selector function fastclime.selector will be able to find all precision matrix corresponding to all lambda values ranging from 1 to lambda.min.

nlambda

It is the number of the path length one would like to achieve. The default length is 50. Note if d is large and nlambda is also large, it is possible that the program will fail to allocate memory for the path.

Details

This program uses parametric simplex linear programming method to solve CLIME (Constrained l1 Minimization Sparse Precision Matrix Estimation) problem. The solution path of the problem corresponds to the parameter in the parametric simplex method.

Value

An object with S3 class "fastclime" is returned:

data

The n by d data matrix or d by d sample covariance matrix from the input

cov.input

An indicator of the sample covariance.

sigmahat

The empirical covariance of the data. If cov.inpu is TRUE, sigmahat = data

maxnlambda

The length of the path. If the program finds lambda.min in less than nlambda iterations for all columns, then the acutal maximum lenth for all columns will be returned. Otherwise it equals nlambda.

lambdamtx

The sequence of regularization parameters for each column, it is a nlambda by d matrix. It will be filled with 0 when the program finds the required lambda.min value for that column. This parameter is required for fastclime.selector.

icovlist

A nlambda list of d by d precision matrices as an alternative graph path (numerical path) corresponding to lambdamtx. This parameter is also required for fastclime.selector.

Note

The program will stop when either the maximum number of iteration for each column nlambda is achieved or when the required lambda.min is achieved for each column. When the dimension is huge, make sure nlambda is small so that there are enough memory to allocate the solution path. lambdamtx and icovlist will be used in fastclime.selector.

Author(s)

Haotian Pang, Han Liu and Robert Vanderbei
Maintainer: Haotan Pang<hpang@princeton.edu>

See Also

fastclime.generator, fastclime.plot, fastclime.selector and fastclime-package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#generate data
L = fastclime.generator(n = 100, d = 20)

#graph path estimation
out1 = fastclime(L$data,0.1)
out2 = fastclime.selector(out1$lambdamtx, out1$icovlist,0.2)
fastclime.plot(out2$adaj)

#graph path estimation using the sample covariance matrix as the input.
out1 = fastclime(cor(L$data),0.1)
out2 = fastclime.selector(out1$lambdamtx, out1$icovlist,0.2)
fastclime.plot(out2$adaj)

Example output

Loading required package: lattice
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: MASS
Loading required package: Matrix
Generating data from the multivariate normal distribution with the random graph structure....done.
Allocating memory 
start recovering 
preparing precision and path matrix list 
Done! 
Allocating memory 
start recovering 
preparing precision and path matrix list 
Done! 

fastclime documentation built on May 2, 2019, 1:06 p.m.