pyproximal.optimization.primal.TwISTยถ

pyproximal.optimization.primal.TwIST(proxg: ProxOperator, A: LinearOperator, b: ndarray[tuple[Any, ...], dtype[_ScalarT]], x0: ndarray[tuple[Any, ...], dtype[_ScalarT]], alpha: float | None = None, beta: float | None = None, eigs: tuple[float, float] | None = None, niter: int = 10, tol: float | None = None, rtol: float | None = None, callback: Callable[[ndarray[tuple[Any, ...], dtype[_ScalarT]]], None] | None = None, show: bool = False, itershow: tuple[int, int, int] = (10, 10, 10), returncost: bool = False) ndarray[tuple[Any, ...], dtype[_ScalarT]] | tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]ยถ

Two-step Iterative Shrinkage/Threshold

Solves the following minimization problem using Two-step Iterative Shrinkage/Threshold:

\[\mathbf{x} = \argmin_\mathbf{x} \frac{1}{2} ||\mathbf{b} - \mathbf{Ax}||_2^2 + g(\mathbf{x})\]

where \(\mathbf{A}\) is a linear operator and \(g(\mathbf{x})\) is any convex function that has a known proximal operator.

Parameters:
proxgpyproximal.ProxOperator

Proximal operator of g function

Apylops.LinearOperator

Linear operator

bnumpy.ndarray

Data

x0numpy.ndarray

Initial vector

alphafloat, optional

Positive scalar weight (if None, estimated based on the eigenvalues of \(\mathbf{A}\), see Notes for details)

betafloat, optional

Positive scalar weight (if None, estimated based on the eigenvalues of \(\mathbf{A}\), see Notes for details)

eigstuple, optional

Largest and smallest eigenvalues of \(\mathbf{A}^H \mathbf{A}\). If passed, computes alpha and beta based on them.

niterint, optional

Number of iterations of iterative scheme

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

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.

returncostbool, optional

Return cost function

Returns:
xnumpy.ndarray

Inverted model

jnumpy.ndarray, optional

Cost function

Notes

See pyproximal.optimization.cls_primal.TwIST

Examples using pyproximal.optimization.primal.TwISTยถ

IHT, ISTA, FISTA, AA-ISTA, and TWIST for Compressive sensing

IHT, ISTA, FISTA, AA-ISTA, and TWIST for Compressive sensing