MoreauEnvelope

class odl.functionals.default_functionals.MoreauEnvelope(*args, **kwargs)[source]

Bases: Functional

Moreau envelope of a convex functional.

The Moreau envelope is a way to smooth an arbitrary convex functional such that its gradient can be computed given the proximal of the original functional. The new functional has the same critical points as the original. It is also called the Moreau-Yosida regularization.

Note that the only computable property of the Moreau envelope is the gradient, the functional itself cannot be evaluated efficiently.

See Proximal Algorithms for more information.

Notes

The Moreau envelope of a convex functional f : \mathcal{X} \rightarrow \mathbb{R} multiplied by a scalar \sigma is defined by

\mathrm{env}_{\sigma f}(x) =
\inf_{y \in \mathcal{X}}
\left\{ \frac{1}{2 \sigma} \| x - y \|_2^2 + f(y) \right\}

The gradient of the envelope is given by

[\nabla \mathrm{env}_{\sigma f}](x) =
\frac{1}{\sigma} (x - \mathrm{prox}_{\sigma f}(x))

Example: if f = \| \cdot \|_1, then

[\mathrm{env}_{\sigma  \| \cdot \|_1}(x)]_i =
\begin{cases}
    \frac{1}{2 \sigma} x_i^2 & \text{if } |x_i| \leq \sigma \\
    |x_i| - \frac{\sigma}{2} & \text{if } |x_i| > \sigma,
\end{cases}

which is the usual Huber functional.

References

__init__(functional, sigma=1.0)[source]

Initialize an instance.

Parameters

functionalFunctional

The functional f in the definition of the Moreau envelope that is to be smoothed.

sigmapositive float, optional

The scalar sigma in the definition of the Moreau envelope. Larger values mean stronger smoothing.

Examples

Create smoothed l1 norm:

>>> space = odl.rn(3)
>>> l1_norm = odl.functionals.L1Norm(space)
>>> smoothed_l1 = MoreauEnvelope(l1_norm)