plot.extlasso: Plot of regularization path

Description Usage Arguments Value Author(s) References Examples

View source: R/extlasso.R

Description

Produces a plot of entire regularization path from a 'extlasso' object obtained using ‘extlasso’ function.

Usage

1
2
## S3 method for class 'extlasso'
plot(x,xvar=c("lambda","L1norm","fraction of norm"),...)

Arguments

x

A ‘extlasso’ object obtained using ‘extlasso’ function.

xvar

What should be on x-axis? xvar="lambda" produces a plot of regularization path with respect to lambda, xvar="L1norm" produces a plot of regularization path with respect to L1 norm of coefficients and xvar="fraction of norm" produces a plot of regularization path with respect to fraction of norm of coefficients. Default is xvar="L1norm".

...

Optional graphical parameters to matplot() function

Value

A plot of regularization path is produced.

Author(s)

B N Mandal and Jun Ma

References

Mandal, B.N. and Jun Ma, (2014). A Jacobi-Armijo Algorithm for LASSO and its Extensions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x=matrix(rnorm(100*30),100,30)
y=rnorm(100)
g1=extlasso(x,y,family="normal")
plot(g1)
plot(g1,xvar="lambda")
x=matrix(rnorm(100*30),100,30)
y=sample(c(0,1),100,replace=TRUE)
g1=extlasso(x,y,family="binomial")
plot(g1)
plot(g1,xvar="lambda")

Example output



extlasso documentation built on May 2, 2019, 11:39 a.m.