pyproximal.optimization.primal.TwIST#
- pyproximal.optimization.primal.TwIST(proxg, A, b, x0, alpha=None, beta=None, eigs=None, niter=10, callback=None, show=False, returncost=False)[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
- proxg
pyproximal.ProxOperator
Proximal operator of g function
- A
pylops.LinearOperator
Linear operator
- b
numpy.ndarray
Data
- x0
numpy.ndarray
Initial vector
- alpha
float
, optional Positive scalar weight (if
None
, estimated based on the eigenvalues of \(\mathbf{A}\), see Notes for details)- beta
float
, optional Positive scalar weight (if
None
, estimated based on the eigenvalues of \(\mathbf{A}\), see Notes for details)- eigs
tuple
, optional Largest and smallest eigenvalues of \(\mathbf{A}^H \mathbf{A}\). If passed, computes alpha and beta based on them.
- niter
int
, optional Number of iterations of iterative scheme
- callback
callable
, optional Function with signature (
callback(x)
) to call after each iteration wherex
is the current model vector- show
bool
, optional Display iterations log
- returncost
bool
, optional Return cost function
- proxg
- Returns
- x
numpy.ndarray
Inverted model
- j
numpy.ndarray
Cost function
- x
Notes
The TwIST algorithm can be expressed by the following recursion:
\[\mathbf{x}^{k+1} = (1-\alpha) \mathbf{x}^{k-1} + (\alpha-\beta) \mathbf{x}^k + \beta \prox_{g} (\mathbf{x}^k + \mathbf{A}^H (\mathbf{b} - \mathbf{A}\mathbf{x}^k)).\]where \(\mathbf{x}^{1} = \prox_{g} (\mathbf{x}^0 + \mathbf{A}^T (\mathbf{b} - \mathbf{A}\mathbf{x}^0))\).
The optimal weighting parameters \(\alpha\) and \(\beta\) are linked to the smallest and largest eigenvalues of \(\mathbf{A}^H\mathbf{A}\) as follows:
\[\begin{split}\alpha = 1 + \rho^2 \\ \beta =\frac{2 \alpha}{\Lambda_{max} + \lambda_{min}}\end{split}\]where \(\rho=\frac{1-\sqrt{k}}{1+\sqrt{k}}\) with \(k=\frac{\lambda_{min}}{\Lambda_{max}}\) and \(\Lambda_{max}=max(1, \lambda_{max})\).
Experimentally, it has been observed that TwIST is robust to the choice of such parameters. Finally, note that in the case of \(\alpha=1\) and \(\beta=1\), TwIST is identical to IST.
Examples using pyproximal.optimization.primal.TwIST
#
IHT, ISTA, FISTA, and TWIST for Compressive sensing