pyproximal.optimization.primal.DouglasRachfordSplittingยถ

pyproximal.optimization.primal.DouglasRachfordSplitting(proxf: ProxOperator, proxg: ProxOperator, x0: ndarray[tuple[Any, ...], dtype[_ScalarT]], tau: float, eta: float = 1.0, niter: int = 10, gfirst: bool = True, tol: float | None = None, rtol: float | None = None, callback: Callable[[...], None] | None = None, callbacky: bool = False, show: bool = False, itershow: tuple[int, int, int] = (10, 10, 10)) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]ยถ

Douglas-Rachford Splitting

Solves the following minimization problem using Douglas-Rachford Splitting algorithm:

\[\mathbf{x} = \argmin_\mathbf{x} f(\mathbf{x}) + g(\mathbf{x})\]

where \(f(\mathbf{x})\) and \(g(\mathbf{x})\) are any convex functions that has known proximal operators.

Parameters:
proxfpyproximal.ProxOperator

Proximal operator of f function

proxgpyproximal.ProxOperator

Proximal operator of g function

x0numpy.ndarray

Initial vector

taufloat

Positive scalar weight

etafloat, optional

Relaxation parameter (must be between 0 and 2, 0 excluded).

niterint, optional

Number of iterations of iterative scheme

gfirstbool, optional

Apply Proximal of operator g first (True) or Proximal of operator f first (False)

tolfloat, optional

Tolerance on change of objective function (used as stopping criterion). If tol=None, run until niter is reached

rtolfloat, optional

Relative tolerance on objective function wrt initial value. Stops the solver when the ratio of the current objective function to the initial objective function is below this value. If rtol=None, run until niter is reached or the other tolerance criterion is met

callbackcallable, optional

Function with signature (callback(x)) to call after each iteration where x is the current model vector

callbackybool, optional

Modify callback signature to (callback(x, y)) when callbacky=True

showbool, optional

Display iterations log

itershowtuple, optional

Display set log for the first N1 steps, last N2 steps, and every N3 steps in between where N1, N2, N3 are the three element of the list.

Returns:
xnumpy.ndarray

Inverted model

ynumpy.ndarray

Inverted second model

Notes

See pyproximal.optimization.cls_primal.DouglasRachfordSplitting

Examples using pyproximal.optimization.primal.DouglasRachfordSplittingยถ

Nonlinear inversion with box constraints

Nonlinear inversion with box constraints