plot.klcv | R Documentation |
plot.klcv
produces a plot to study the sequence of leave-one-out cross-validated Kullback-Leibler divergences computed by klcv
.
## S3 method for class 'klcv' plot(x, ...)
x |
fitted |
... |
other parameters to be passed through the plotting function. |
This method function produces a plot showing the sequence of leave-one-out cross-validated Kullback-Leibler as function of the tuning parameter rho. The optimal value of the tuning parameter is identified by a vertical dashed line.
Luigi Augugliaro
Maintainer: Luigi Augugliaro luigi.augugliaro@unipa.it
klcv
function.
N <- 100 p <- 5 X <- matrix(rnorm(N * p), N, p) S <- crossprod(X) / N mask <- outer(1:p, 1:p, function(i,j) 0.5^abs(i-j)) mask[1,5] <- mask[1,4] <- mask[2,5] <- NA mask[5,1] <- mask[4,1] <- mask[5,2] <- NA out.sglasso_path <- sglasso(S, mask, tol = 1.0e-13) out.klcv <- klcv(out.sglasso_path, X) plot(out.klcv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.