Learn R Programming

sparsenet (version 1.6)

plot.cv.sparsenet: plot the cross-validation curves produced by cv.sparsenet

Description

Plots the cross-validation curves for each value of gamma in one figure, as a function of the lambda values used.

Usage

# S3 method for cv.sparsenet
plot(x,  ...)

Arguments

x

fitted "cv.sparsenet" object

...

Other graphical parameters to plot

Author

Rahul Mazumder, Jerome Friedman and Trevor Hastie

Maintainer: Trevor Hastie <hastie@stanford.edu>

Details

A plot is produced, and nothing is returned.

References

Mazumder, Rahul, Friedman, Jerome and Hastie, Trevor (2011) SparseNet: Coordinate Descent with Nonconvex Penalties. JASA, Vol 106(495), 1125-38, https://hastie.su.domains/public/Papers/Sparsenet/Mazumder-SparseNetCoordinateDescent-2011.pdf

See Also

glmnet package, sparsenet, cv.sparsenet and print and plot methods for both.

Examples

Run this code
x=matrix(rnorm(100*20),100,20)
y=rnorm(100)
fitcv=cv.sparsenet(x,y)
plot(fitcv)

Run the code above in your browser using DataLab