pyproximal.projection.BoxProj#

class pyproximal.projection.BoxProj(lower=-inf, upper=inf)[source]#

Box orthogonal projection.

Parameters
lowerfloat or np.ndarray, optional

Lower bound

upperfloat or np.ndarray, optional

Upper bound

Notes

Given a Box set defined as:

\[\operatorname{Box}_{[l, u]} = \{ x: l \leq x\leq u \}\]

its orthogonal projection is:

\[\begin{split}P_{\operatorname{Box}_{[l, u]}} (x_i) = min\{ max \{x_i, l_i\}, u_i \} = \begin{cases} l_i, & x_i < l_i\\ x_i,& l_i \leq x_i \leq u_i \\ u_i, & x_i > u_i\\ \end{cases} \quad \forall i\end{split}\]

Note that this is the proximal operator of the corresponding indicator function \(\mathcal{I}_{\operatorname{Box}_{[l, u]}}\).

Methods

__init__([lower, upper])