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:
- ndim
int 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
xshould be created by stacking vectors from different dimensions.- radius
intorfunc, 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
proxmethod has been invoked before and returns a scalarradiusto be used.
- ndim
Notes
As the \(L_{1,0}\) ball is an indicator function, the proximal operator corresponds to its orthogonal projection (see
pyproximal.projection.L10BallProjfor 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)