cv.clime {clime} | R Documentation |
k-fold cross validation for clime object
Description
Perform a k-fold cross validation for selecting lambda
Usage
cv.clime(clime.obj, loss=c("likelihood", "tracel2"), fold=5)
Arguments
clime.obj |
clime object output from |
loss |
loss to be used in cross validation. Currently, two losses are available: "likelihood" and "tracel2". Default "likelihood". |
fold |
number of folds used in cross validation. Default 5. |
Details
Perform a k-fold cross validation for selecting the tuning parameter
lambda
in clime. Two losses are implemented currently:
\textrm{likelihood: } Tr[\Sigma \Omega] - \log|\Omega| -
p
\textrm{tracel2: } Tr[ diag(\Sigma \Omega - I)^2].
Value
An object with S3 class "cv.clime"
. You can use it as a
regular R list with the following fields:
lambdaopt |
the lambda selected by cross validation to minimize the loss over
the grid values of |
loss |
the name of loss used in cross validation. |
lambda |
sequence of |
loss.mean |
average k-fold loss values for each grid value |
loss.mean |
standard deviation of k-fold loss values for each grid value |
lpfun |
Linear programming solver used. |
Author(s)
T. Tony Cai, Weidong Liu and Xi (Rossi) Luo
Maintainer: Xi (Rossi) Luo xi.rossi.luo@gmail.com
References
Cai, T.T., Liu, W., and Luo, X. (2011).
A constrained \ell_1
minimization approach for sparse precision matrix estimation.
Journal of the American Statistical Association 106(494): 594-607.
Examples
## trivial example
n <- 50
p <- 5
X <- matrix(rnorm(n*p), nrow=n)
re.clime <- clime(X)
re.cv <- cv.clime(re.clime)
re.clime.opt <- clime(X, re.cv$lambdaopt)