Learn R Programming

gglasso (version 1.5.1)

plot.gglasso: Plot solution paths from a "gglasso" object

Description

Produces a coefficient profile plot of the coefficient paths for a fitted gglasso object.

Usage

# S3 method for gglasso
plot(x, group = FALSE, log.l = TRUE, ...)

Arguments

x

fitted gglasso model

group

what is on the Y-axis. Plot the norm of each group if TRUE. Plot each coefficient if FALSE.

log.l

what is on the X-axis. Plot against the log-lambda sequence if TRUE. Plot against the lambda sequence if FALSE.

...

other graphical parameters to plot

Author

Yi Yang and Hui Zou
Maintainer: Yi Yang <yi.yang6@mcgill.ca>

Details

A coefficient profile plot is produced.

References

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

Examples

Run this code

# 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

Run the code above in your browser using DataLab