skprox.operators
Submodules
Package Contents
Classes
Common interface for proximal operators of a function. |
|
Common interface for proximal operators of a function. |
- class skprox.operators.Composite(prox_ops, max_iter=5000, weights=None)
Bases:
pyproximal.ProxOperatorCommon interface for proximal operators of a function.
This class defines the overarching structure of any proximal operator. It contains two main methods,
proxanddualproxwhich are both implemented by means of the Moreau decomposition assuming explicit knowledge of the other method. For this reason any proximal operators that subclasses theProxOperatorclass needs at least one of these two methods to be implemented directly.Note
End users of PyProx 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 PyProx. Find more details regarding implementation of new operators at addingoperator.
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).
Notes
The proximal operator of a function
fis defined as:\[prox_{\tau f} (\mathbf{x}) = \argmin_{\mathbf{y}} f(\mathbf{y}) + \frac{1}{2 \tau}||\mathbf{y} - \mathbf{x}||^2_2\]- prox(x, tau, **kwargs)
Proximal operator applied to a vector
The proximal operator can always be computed given its dual proximal operator using the Moreau decomposition as defined in
pyprox.moreau(). For this reason we can easily create a common method for all proximal operators that can be evaluated provided the dual proximal is implemented.However, direct implementations are generally available. This can be done by simply implementing
proxfor a specific proximal operator, which will overwrite the general method.Parameters
- x
np.ndarray Vector
- tau
float Positive scalar weight
- x
- Op
- class skprox.operators.TV(sigma, dims, isotropic=True, max_iter=1000)
- unmask(x)
- mask(x)
- _increment_count()
Increment counter
- prox(x, tau)
- __call__(x)
- class skprox.operators.TVL1(sigma, shape=None, l1_ratio=0.05, dgap_tol=5e-05, x_tol=0.01, max_iter=200, check_gap_frequency=10)
Bases:
pyproximal.ProxOperatorCommon interface for proximal operators of a function.
This class defines the overarching structure of any proximal operator. It contains two main methods,
proxanddualproxwhich are both implemented by means of the Moreau decomposition assuming explicit knowledge of the other method. For this reason any proximal operators that subclasses theProxOperatorclass needs at least one of these two methods to be implemented directly.Note
End users of PyProx 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 PyProx. Find more details regarding implementation of new operators at addingoperator.
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).
Notes
The proximal operator of a function
fis defined as:\[prox_{\tau f} (\mathbf{x}) = \argmin_{\mathbf{y}} f(\mathbf{y}) + \frac{1}{2 \tau}||\mathbf{y} - \mathbf{x}||^2_2\]- unmask(x)
- mask(x)
- prox(x, tau, **kwargs)
Proximal operator applied to a vector
The proximal operator can always be computed given its dual proximal operator using the Moreau decomposition as defined in
pyprox.moreau(). For this reason we can easily create a common method for all proximal operators that can be evaluated provided the dual proximal is implemented.However, direct implementations are generally available. This can be done by simply implementing
proxfor a specific proximal operator, which will overwrite the general method.Parameters
- x
np.ndarray Vector
- tau
float Positive scalar weight
- x
- __call__(x)
- Op