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.
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
