plot.extlasso | R Documentation |
Produces a plot of entire regularization path from a 'extlasso' object obtained using ‘extlasso’ function.
## S3 method for class 'extlasso' plot(x,xvar=c("lambda","L1norm","fraction of norm"),...)
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 |
A plot of regularization path is produced.
B N Mandal and Jun Ma
Mandal, B.N. and Jun Ma, (2014). A Jacobi-Armijo Algorithm for LASSO and its Extensions.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.