pyproximal.ProxOperator#
- class pyproximal.ProxOperator(Op=None, hasgrad=False, sigmame=1.0)[source]#
Common interface for proximal operators of a function.
This class defines the overarching structure of any proximal operator. It contains two main methods,
prox
anddualprox
which are both implemented by means of the Moreau decomposition assuming explicit knowledge of the other method. For this reason any proximal operators that subclasses theProxOperator
class needs at least one of these two methods to be implemented directly.Moreover, the method
grad
is also defined to compute the gradient of the Moreau envelope of the function. This function is only called if the user does not provide a gradient function when creating the proximal operator. The variablehasgrad
is used to indicate if the function has a gradient or not (and thus if thegrad
method computes the gradient of the actual function or of its Moreau envelope).Note
End users of PyProximal should not use this class directly but simply use operators that are already implemented. This class is meant for developers and it has to be used as the parent class of any new operator developed within PyProximal. Find more details regarding implementation of new operators at Implementing new operators.
- Parameters
- Op
pylops.LinearOperator
, optional Linear operator used by the Proximal operator
- hasgrad
bool
, optional Flag to indicate if the function is differentiable, i.e., has a uniquely defined gradient (
True
) or not (False
).- sigmame
float
, optional Relaxation parameter of the Moreau envelope (when
sigmame
tends to infinity the gradient of the Moreau envelope tends to the gradient of the function itself). Refer to the docstring of thegrad
method for more details.
- Op
Notes
The proximal operator of a function
f
is defined as:\[prox_{\tau f} (\mathbf{x}) = \argmin_{\mathbf{y}} f(\mathbf{y}) + \frac{1}{2 \tau}||\mathbf{y} - \mathbf{x}||^2_2\]Methods
__init__
([Op, hasgrad, sigmame])affine_addition
(v)Affine addition
chain
(g)Chain
grad
(x)Compute gradient of the Moreau envelope of the function.
postcomposition
(sigma)Postcomposition
precomposition
(a, b)Precomposition
prox
(**kwargs)proxdual
(**kwargs)
Examples using pyproximal.ProxOperator
#

IHT, ISTA, FISTA, AA-ISTA, and TWIST for Compressive sensing