prox.elasticnet: Proximal operator of the scaled elastic net penalty.

Description Usage Arguments Value Examples

Description

Computes the proximal operator of the scaled elastic net penalty:

h(x) = λ [ (1 - α)/2 ||x||_2^2 + α ||x||_1 ] ,

where λ is a scaling factor and α \in [0,1] balances between the L1 and L2 norms.

Usage

1
prox.elasticnet(x, t = 1, opts = list(lambda = 1, alpha = 1))

Arguments

x

The input vector

t

The step size (default is 1)

opts

List of parameters, which can include:

  • lambda : the scaling factor of the L1 norm (default is lambda=1)

  • alpha : the balance between L1 and L2 norms. alpha=0 is the squared L2 (ridge) penalty, alpha=1 is the L1 (lasso) penalty. Default is alpha=1 (lasso).

Value

The proximal of h at x with step size t, given by

prox_h(x,t) = argmin_u [ t h(u) + 1/2 || x - u ||^2 ]

.

Examples

1
prox.elasticnet(c(1,3,-2), 1.5, list(lambda=1,alpha=0.5))

jpvert/apg documentation built on May 19, 2019, 11:51 p.m.