pyproximal.L0#

class pyproximal.L0(sigma=1.0)[source]#

\(L_0\) norm proximal operator.

Proximal operator of the \(\ell_0\) norm: \(\sigma\|\mathbf{x}\|_0 = \text{count}(x_i \ne 0)\).

Parameters
sigmafloat or list or np.ndarray or func, optional

Multiplicative coefficient of L0 norm. This can be a constant number, a list of values (for multidimensional inputs, acting on the second dimension) 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 (or a list of) sigma to be used.

Notes

The \(\ell_0\) proximal operator is defined as:

\[\begin{split}\prox_{\tau \sigma \|\cdot\|_0}(\mathbf{x}) = \operatorname{hard}(\mathbf{x}, \tau \sigma) = \begin{cases} x_i, & x_i < -\tau \sigma \\ 0, & -\tau\sigma \leq x_i \leq \tau\sigma \\ x_i, & x_i > \tau\sigma\\ \end{cases}\end{split}\]

where \(\operatorname{hard}\) is the so-called called hard thresholding.

Methods

__init__([sigma])

affine_addition(v)

Affine addition

chain(g)

Chain

grad(x)

Compute gradient

postcomposition(sigma)

Postcomposition

precomposition(a, b)

Precomposition

prox(*args, **kwargs)

proxdual(**kwargs)