plot.cv.SGL: plots the cross-validated error curve produced by cv.SGL

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/plot.cv.SGL.R

Description

Plots the cross-validated error curve, and confidence bounds for each lambda in our regularization path.

Usage

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

Arguments

x

fitted "cv.SGL" object

...

additional arguments to be passed to plot

Details

A cross validated deviance plot is produced. More regularized models are to the right (less regularized to the left)

Author(s)

Noah Simon, Jerome Friedman, Trevor Hastie, and Rob Tibshirani
Maintainer: Noah Simon <nrsimon@uw.edu>

References

Simon, N., Friedman, J., Hastie T., and Tibshirani, R. (2011) A Sparse-Group Lasso,
http://faculty.washington.edu/nrsimon/SGLpaper.pdf

See Also

SGL and cv.SGL.

Examples

1
2
3
4
5
6
7
8
n = 50; p = 100; size.groups = 10
index <- ceiling(1:p / size.groups)
X = matrix(rnorm(n * p), ncol = p, nrow = n)
beta = (-2:2)
y = X[,1:5] %*% beta + 0.1*rnorm(n)
data = list(x = X, y = y)
cvFit = cvSGL(data, index, type = "linear")
plot(cvFit)

Example output



SGL documentation built on Sept. 28, 2019, 1:03 a.m.