Learn R Programming

fastclime (version 1.4.1.1)

fastclime: The main solver for fastclime package

Description

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

Usage

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

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.

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.

Author

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

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.

See Also

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

Examples

Run this code
#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)

Run the code above in your browser using DataLab