Description Usage Arguments Details Author(s) References See Also Examples
Plots the cross-validated error curve, and confidence bounds for each lambda
in our regularization path.
1 2 |
x |
fitted |
... |
additional arguments to be passed to plot |
A cross validated deviance plot is produced. More regularized models are to the right (less regularized to the left)
Kourosh Zarringhalam
Modified from SGL package: Noah Simon, Jerome Friedman, Trevor Hastie, and Rob Tibshirani
Maintainer: Kourosh Zarringhalam <kourosh.zarringhalam@umb.edu>
Simon, N., Friedman, J., Hastie T., and Tibshirani, R. (2011)
A Sparse-Group Lasso,
http://www-stat.stanford.edu/~nsimon/creSGL.pdf
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.