plot.cv.MLGL: Plot the cross-validation obtained from 'cv.MLGL' function

Description Usage Arguments See Also Examples

View source: R/plot.R

Description

Plot the cross-validation obtained from cv.MLGL function

Usage

1
2
## S3 method for class 'cv.MLGL'
plot(x, log.lambda = FALSE, ...)

Arguments

x

cv.MLGL object

log.lambda

If TRUE, use log(lambda) instead of lambda in abscissa

...

Other parameters for plot function

See Also

cv.MLGL

Examples

1
2
3
4
5
6
7
8
9
set.seed(42)
# Simulate gaussian data with block-diagonal variance matrix containing 12 blocks of size 5
X <- simuBlockGaussian(50, 12, 5, 0.7)
# Generate a response variable
y <- X[,c(2,7,12)]%*%c(2,2,-2) + rnorm(50,0,0.5)
# Apply cv.MLGL method
res <- cv.MLGL(X,y)
# Plot the cv error curve
plot(res) 

MLGL documentation built on Dec. 31, 2019, 3 a.m.