objFunctionGradient {smoothedLasso}R Documentation

Auxiliary function which computes the (non-smooth) gradient of an L1 penalized regression operator.

Description

Auxiliary function which computes the (non-smooth) gradient of an L1 penalized regression operator.

Usage

objFunctionGradient(betavector, w, du, dv, dw)

Arguments

betavector

The vector of regression coefficients.

w

The function encoding the dependence structure among the regression coefficients.

du

The derivative (gradient) of the objective of the regression operator.

dv

The derivative (gradient) of the penalty of the regression operator.

dw

The derivative (Jacobian matrix) of the function encoding the dependence structure among the regression coefficients.

Value

The value of the gradient for the input betavector.

References

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

library(smoothedLasso)
n <- 100
p <- 500
betavector <- runif(p)
X <- matrix(runif(n*p),nrow=n,ncol=p)
y <- X %*% betavector
lambda <- 1
temp <- standardLasso(X,y,lambda)
print(objFunctionGradient(betavector,temp$w,temp$du,temp$dv,temp$dw))


[Package smoothedLasso version 1.6 Index]