jaxopt.prox.prox_lasso

jaxopt.prox.prox_lasso(x, l1reg=None, scaling=1.0)[source]

Proximal operator for the l1 norm, i.e., soft-thresholding operator.

\[\underset{y}{\text{argmin}} ~ \frac{1}{2} ||x - y||_2^2 + \text{scaling} \cdot \text{l1reg} \cdot ||y||_1\]

When l1reg is a pytree, the weights are applied coordinate-wise.

Parameters
  • x (Any) – input pytree.

  • l1reg (Optional[Any]) – regularization strength, float or pytree with the same structure as x.

  • scaling (float) – a scaling factor.

Return type

Any

Returns

output pytree, with same structure as x.