Skip to contents

Closed forms for the standard penalties. Note that "l1" soft-thresholds each coordinate (giving sparsity) while "l2" shrinks the whole vector as a block – choosing the wrong one is the usual cause of a group lasso that will not select groups.

Usage

morie_boyd_proximal(h, v, t = 1, lo = NULL, hi = NULL)

Arguments

h

One of "l1", "l2", "l2sq", "nonneg", "box", "zero".

v

Point at which to evaluate.

t

Step size, positive.

lo, hi

Box bounds, required when h = "box".

Value

List with prox, moreau, h_value, h_name.

References

Parikh, N., & Boyd, S. (2014). Proximal algorithms. Foundations and Trends in Optimization 1(3), 127-239.

Examples

morie_boyd_proximal("l1", c(3, -0.5, 0.2), t = 1)$prox
#> [1] 2 0 0