Description Usage Arguments Value References Examples
View source: R/smoothedLasso.r
Auxiliary function which computes the gradient of the smoothed L1 penalized regression operator.
1 | objFunctionSmoothGradient(betavector, w, du, dv, dw, mu, entropy = TRUE)
|
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. |
mu |
The Nesterov smoothing parameter. |
entropy |
A boolean switch to select the entropy prox function (default) or the squared error prox function. |
The value of the gradient for the input betavector.
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.
1 2 3 4 5 6 7 8 9 | 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(objFunctionSmoothGradient(betavector,temp$w,temp$du,temp$dv,temp$dw,mu=0.1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.