pyproximal.projection.EuclideanBallProj

class pyproximal.projection.EuclideanBallProj(center: ndarray[tuple[Any, ...], dtype[_ScalarT]] | float, radius: float)[source]

Euclidean ball projection.

Parameters:
centernumpy.ndarray or float

Center of the ball

radiusfloat

Radius

Notes

Given an Euclidean ball defined as:

\[\operatorname{Eucl}_{[c, r]} = \{ \mathbf{x}: l ||\mathbf{x} - \mathbf{c}||_2 \leq r \}\]

its orthogonal projection is:

\[P_{\operatorname{Eucl}_{[c, r]}} (\mathbf{x}) = \mathbf{c} + \frac{r} {max\{ ||\mathbf{x} - \mathbf{c}||_2^2, r\}}(\mathbf{x} - \mathbf{c})\]

Note the this is the proximal operator of the corresponding indicator function \(\mathcal{I}_{\operatorname{Eucl}_{[c, r]}}\).

Methods

__init__(center, radius)

Examples using pyproximal.projection.EuclideanBallProj

Dykstra’s algorithms

Dykstra's algorithms