pyproximal.Box

class pyproximal.Box(lower: float | ndarray[tuple[Any, ...], dtype[_ScalarT]] = -inf, upper: float | ndarray[tuple[Any, ...], dtype[_ScalarT]] = inf)[source]

Box proximal operator.

Proximal operator of a Box: \(\operatorname{Box}_{[l, u]} = \{ x: l \leq x\leq u \}\).

Parameters:
lowerfloat or numpy.ndarray, optional

Lower bound

upperfloat or numpy.ndarray, optional

Upper bound

Notes

As the Box is an indicator function, the proximal operator corresponds to its orthogonal projection (see pyproximal.projection.BoxProj for details.

Methods

__init__([lower, upper])

affine_addition(v)

Affine addition

chain(g)

Chain

grad(x)

Gradient of the Moreau envelope of the function.

postcomposition(sigma)

Postcomposition

precomposition(a, b)

Precomposition

prox(**kwargs)

proxdual(**kwargs)

Examples using pyproximal.Box

Dykstra’s algorithms

Dykstra's algorithms

Indicators

Indicators

Low-Rank completion via Matrix factorization

Low-Rank completion via Matrix factorization

Nonlinear inversion with box constraints

Nonlinear inversion with box constraints

Quadratic program with box constraints

Quadratic program with box constraints