pyproximal.L10Ballยถ

class pyproximal.L10Ball(ndim: int, radius: int | Callable[[int], int])[source]ยถ

\(L_{1,0}\) ball proximal operator.

Proximal operator of the \(L_{1,0}\) ball: \(L_{1,0}^{r} = \{ \mathbf{x}: \text{count}([||\mathbf{x}_1||_1, ||\mathbf{x}_2||_1, ..., ||\mathbf{x}_1||_1] \ne 0) \leq r \}\)

Parameters:
ndimint

Number of dimensions \(N_{dim}\). Used to reshape the input array in a matrix of size \(N_{dim} \times N'_{x}\) where \(N'_x = \frac{N_x}{N_{dim}}\). Note that the input vector x should be created by stacking vectors from different dimensions.

radiusint or func, optional

Radius. This can be a constant number or a function that is called passing a counter which keeps track of how many times the prox method has been invoked before and returns a scalar radius to be used.

Notes

As the \(L_{1,0}\) ball is an indicator function, the proximal operator corresponds to its orthogonal projection (see pyproximal.projection.L10BallProj for details.

Methods

__init__(ndim, radius)

affine_addition(v)

Affine addition

chain(g)

Chain

grad(x)

Gradient of the Moreau envelope of the function.

postcomposition(sigma)

Postcomposition

precomposition(a, b)

Precomposition

prox(*args, **kwargs)

proxdual(**kwargs)

Examples using pyproximal.L10Ballยถ

Group sparsity

Group sparsity