plot.gglasso | R Documentation |
Produces a coefficient profile plot of the coefficient paths for a fitted
gglasso
object.
## S3 method for class 'gglasso'
plot(x, group = FALSE, log.l = TRUE, ...)
x |
fitted |
group |
what is on the Y-axis. Plot the norm of each group if
|
log.l |
what is on the X-axis. Plot against the log-lambda sequence if
|
... |
other graphical parameters to plot |
A coefficient profile plot is produced.
Yi Yang and Hui Zou
Maintainer: Yi Yang <yi.yang6@mcgill.ca>
Yang, Y. and Zou, H. (2015), “A Fast Unified Algorithm for
Computing Group-Lasso Penalized Learning Problems,” Statistics and
Computing. 25(6), 1129-1141.
BugReport:
https://github.com/emeryyi/gglasso
# load gglasso library
library(gglasso)
# load data set
data(bardet)
# define group index
group <- rep(1:20,each=5)
# fit group lasso
m1 <- gglasso(x=bardet$x,y=bardet$y,group=group,loss="ls")
# make plots
par(mfrow=c(1,3))
plot(m1) # plots the coefficients against the log-lambda sequence
plot(m1,group=TRUE) # plots group norm against the log-lambda sequence
plot(m1,log.l=FALSE) # plots against the lambda sequence
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.