pyproximal.L01Ball#

class pyproximal.L01Ball(ndim, radius)[source]#

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

Proximal operator of the \(L_{0,1}\) ball: \(L_{0,1}^{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 L0 ball is an indicator function, the proximal operator corresponds to its orthogonal projection (see pyproximal.projection.L01BallProj for details.

Methods

__init__(ndim, radius)

affine_addition(v)

Affine addition

chain(g)

Chain

grad(x)

Compute gradient

postcomposition(sigma)

Postcomposition

precomposition(a, b)

Precomposition

prox(*args, **kwargs)

proxdual(**kwargs)

Examples using pyproximal.L01Ball#

Group sparsity

Group sparsity