plot.sparsenet: plot coefficients from a "sparsenet" object

View source: R/plot.sparsenet.R

plot.sparsenetR Documentation

plot coefficients from a "sparsenet" object

Description

Produces a series of coefficient profile plots of the coefficient paths for a fitted "sparsenet" object.

Usage

## S3 method for class 'sparsenet'
plot(x, xvar = c("rsq","lambda","norm"), which.gamma=NULL, label = FALSE,...)

Arguments

x

fitted "sparsenet" model

xvar

What is on the X-axis. "rsq" plots against the percent variance explained on the training data, "lambda" against the log-lambda sequence, and "norm" plots against the L1-norm of the coefficients

which.gamma

sequence numbers of gamma values to be used in the plots; default is all used in the fit

label

If TRUE, label the curves with variable sequence numbers.

...

Other graphical parameters to plot

Details

A series of coefficient profile plots is produced, one for each gamma specified. Users should set up the appropriate layout.

Author(s)

Rahul Mazumder, Jerome Friedman and Trevor Hastie

Maintainer: Trevor Hastie <hastie@stanford.edu>

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

x=matrix(rnorm(100*20),100,20)
y=rnorm(100)
fit=sparsenet(x,y)
par(mfrow=c(3,3))
plot(fit)

sparsenet documentation built on Aug. 22, 2023, 9:11 a.m.