plot.cv.gcdnet {gcdnet} | R Documentation |
Plot the cross-validation curve produced by cv.gcdnet
Description
Plots the cross-validation curve, and upper and lower standard deviation
curves, as a function of the lambda
values used. This function is
modified based on the plot.cv
function from the glmnet
package.
Usage
## S3 method for class 'cv.gcdnet'
plot(x, sign.lambda = 1, ...)
Arguments
x |
fitted |
sign.lambda |
either plot against |
... |
other graphical parameters to plot |
Details
A plot is produced.
Author(s)
Yi Yang, Yuwen Gu and Hui Zou
Maintainer: Yi Yang <yi.yang6@mcgill.ca>
References
Yang, Y. and Zou, H. (2012).
"An Efficient Algorithm for Computing The HHSVM and Its Generalizations."
Journal of Computational and Graphical Statistics, 22, 396-415.
BugReport: https://github.com/emeryyi/gcdnet
Gu, Y., and Zou, H. (2016).
"High-dimensional generalizations of asymmetric least squares regression and their applications."
The Annals of Statistics, 44(6), 2661–2694.
Friedman, J., Hastie, T., and Tibshirani, R. (2010).
"Regularization paths for generalized linear models via coordinate descent."
Journal of Statistical Software, 33, 1.
https://www.jstatsoft.org/v33/i01/
See Also
Examples
# fit an elastic net penalized logistic regression with lambda2 = 1 for the
# L2 penalty. Use the logistic loss as the cross validation prediction loss.
# Use five-fold CV to choose the optimal lambda for the L1 penalty.
data(FHT)
set.seed(2011)
cv=cv.gcdnet(FHT$x, FHT$y, method ="logit", lambda2 = 1,
pred.loss="loss", nfolds=5)
plot(cv)