Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.enet

Plot method for enet objects


Description

Produce a plot of an enet fit. The default is a complete coefficient path.

Usage

## S3 method for class 'enet'
plot(x, xvar = c("fraction", "penalty", "L1norm", "step"),
use.color = FALSE, ...)

Arguments

x

enet object

xvar

The type of x variable against which to plot. xvar=fraction plots agains the fraction of the L1 norm of the coefficient vector (default). xvar=penalty plots against the 1-norm penalty parameter. xvar=L1norm plots against the L1 norm of the coefficient vector. xvar=step plots against the LARS-EN step number.

use.color

a colorful plot?

...

Additonal arguments for generic plot.

Value

NULL

Author(s)

Hui Zou and Trevor Hastie

References

Zou and Hastie (2005) "Regularization and Variable Selection via the Elastic Net" Journal of the Royal Statistical Society, Series B,67,301-320.

Examples

data(diabetes)
attach(diabetes)
object <- enet(x,y,lambda=1)
par(mfrow=c(2,2))
plot(object)
plot(object,xvar="step")
detach(diabetes)

elasticnet

Elastic-Net for Sparse Estimation and Sparse PCA

v1.3
GPL (>= 2)
Authors
Hui Zou <zouxx019@umn.edu> and Trevor Hastie <hastie@stanford.edu>
Initial release
2020-05-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.