fusedLasso: Auxiliary function which returns the objective, penalty, and...

Description Usage Arguments Value References Examples

View source: R/smoothedLasso.r

Description

Auxiliary function which returns the objective, penalty, and dependence structure among regression coefficients of the fused Lasso.

Usage

1
fusedLasso(X, y, E, lambda, gamma)

Arguments

X

The design matrix.

y

The response vector.

E

The adjacency matrix which encodes with a one in position (i,j) the presence of an edge between variables i and j. Note that only the upper triangle of E is read.

lambda

The first regularization parameter of the fused Lasso.

gamma

The second regularization parameter of the fused Lasso.

Value

A list with six functions, precisely the objective u, penalty v, and dependence structure w, as well as their derivatives du, dv, and dw.

References

Tibshirani, R., Saunders, M., Rosset, S., Zhu, J., and Knight, K. (2005). Sparsity and Smoothness via the Fused Lasso. J Roy Stat Soc B Met, 67(1):91-108.

Arnold, T.B. and Tibshirani, R.J. (2020). genlasso: Path Algorithm for Generalized Lasso Problems. R package version 1.5.

Hahn, G., Lutz, S., Laha, N., and Lange, C. (2020). A framework to efficiently smooth L1 penalties for linear regression. bioRxiv:2020.09.17.301788.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(smoothedLasso)
n <- 100
p <- 500
betavector <- runif(p)
X <- matrix(runif(n*p),nrow=n,ncol=p)
y <- X %*% betavector
E <- matrix(sample(c(TRUE,FALSE),p*p,replace=TRUE),p)
lambda <- 1
gamma <- 0.5
temp <- fusedLasso(X,y,E,lambda,gamma)

smoothedLasso documentation built on March 21, 2021, 9:07 a.m.