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

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

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)

Kourosh Zarringhalam

Modified from SGL package: Noah Simon, Jerome Friedman, Trevor Hastie, and Rob Tibshirani

Maintainer: Kourosh Zarringhalam <kourosh.zarringhalam@umb.edu>

References

Simon, N., Friedman, J., Hastie T., and Tibshirani, R. (2011) A Sparse-Group Lasso,
http://www-stat.stanford.edu/~nsimon/creSGL.pdf

See Also

creSGL and cv.SGL.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)
y = ifelse((exp(y) / (1 + exp(y))) > 0.5, 1, 0)
data = list(x = X, y = y)
weights = rep(1, size.groups)
cvFit = cvSGL(data, index, weights, type = "logit", maxit = 1000, thresh = 0.001, min.frac = 0.05, nlam = 100, gamma = 0.8, nfold = 10, standardize = TRUE, verbose = FALSE, step = 1, reset = 10, alpha = 0.05, lambdas = NULL)
plot(cvFit)

kouroshz/creNet documentation built on May 20, 2019, 1:11 p.m.