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

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

View source: R/plot.sparsenet.R

Description

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

Usage

1
2
## 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 <[email protected]>

References

http://www.stanford.edu/~hastie/Papers/Sparsenet/jasa_MFH_final.pdf

See Also

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

Examples

1
2
3
4
5
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 May 29, 2017, 2:19 p.m.