Plot Method for Leave-One-Out Cross-Validated Kullback-Leibler Divergence

Share:

Description

plot.klcv produces a plot to study the sequence of leave-one-out cross-validated Kullback-Leibler divergences computed by klcv.

Usage

1
2
## S3 method for class 'klcv'
plot(x, ...)

Arguments

x

fitted klcv object;

...

other parameters to be passed through the plotting function.

Details

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.

Author(s)

Luigi Augugliaro
Maintainer: Luigi Augugliaro luigi.augugliaro@unipa.it

See Also

klcv function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)