cv.clime | R Documentation |
Perform a k-fold cross validation for selecting lambda
cv.clime(clime.obj, loss=c("likelihood", "tracel2"), fold=5)
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. |
Perform a k-fold cross validation for selecting the tuning parameter
lambda
in clime. Two losses are implemented currently:
\textrm{likelihood: } Tr[Σ Ω] - \log|Ω| - p
\textrm{tracel2: } Tr[ diag(Σ Ω - I)^2].
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. |
T. Tony Cai, Weidong Liu and Xi (Rossi) Luo
Maintainer: Xi (Rossi) Luo xi.rossi.luo@gmail.com
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.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.