jaxopt.projection.projection_l1_sphere

jaxopt.projection.projection_l1_sphere(x, value=1.0)[source]

Projection onto the l1 sphere:

\[\underset{y}{\text{argmin}} ~ ||x - y||_2^2 \quad \textrm{subject to} \quad ||y||_1 = \text{value}\]
Parameters
  • x (Array) – array to project.

  • value (float) – radius of the sphere.

Return type

Array

Returns

output array, with the same shape as x.