pyproximal.optimization.primal.HQSยถ

pyproximal.optimization.primal.HQS(proxf: ProxOperator, proxg: ProxOperator, x0: ndarray[tuple[Any, ...], dtype[_ScalarT]], tau: float | ndarray[tuple[Any, ...], dtype[_ScalarT]], niter: int = 10, z0: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None = None, gfirst: bool = True, tol: float | None = None, rtol: float | None = None, callback: Callable[[...], None] | None = None, callbackz: 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]ยถ

Half Quadratic splitting

Solves the following minimization problem using Half Quadratic splitting algorithm:

\[\begin{split}\mathbf{x},\mathbf{z} = \argmin_{\mathbf{x},\mathbf{z}} f(\mathbf{x}) + g(\mathbf{z}) \\ s.t. \; \mathbf{x}=\mathbf{z}\end{split}\]

where \(f(\mathbf{x})\) and \(g(\mathbf{z})\) are any convex function that has a known proximal operator.

Parameters:
proxfpyproximal.ProxOperator

Proximal operator of f function

proxgpyproximal.ProxOperator

Proximal operator of g function

x0numpy.ndarray

Initial vector (not required when gfirst=False, can pass None)

taufloat or numpy.ndarray

Positive scalar weight, which should satisfy the following condition to guarantees convergence: \(\tau \in (0, 1/L]\) where L is the Lipschitz constant of \(\nabla f\). Finally note that \(\tau\) can be chosen to be a vector of size niter such that different \(\tau\) is used at different iterations (i.e., continuation strategy)

niterint

Number of iterations of iterative scheme

z0numpy.ndarray, optional

Initial z vector (not required when gfirst=True)

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

callbackzbool, optional

Modify callback signature to (callback(x, z)) when callbackz=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

znumpy.ndarray

Inverted second model

Raises:
ValueError

If both x0 and z0 are set to None

Notes

See pyproximal.optimization.cls_primal.HQS

Examples using pyproximal.optimization.primal.HQSยถ

Deblending

Deblending

Plug and Play Priors

Plug and Play Priors