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

View source: R/plot.gglasso.R

plot.gglassoR Documentation

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 class '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

Details

A coefficient profile plot is produced.

Author(s)

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

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


# 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

gglasso documentation built on May 29, 2024, 2:38 a.m.