pylops.optimization.sparsity.ista¶
- pylops.optimization.sparsity.ista(Op, y, x0=None, niter=10, SOp=None, eps=0.1, alpha=None, eigsdict=None, tol=1e-10, rtol=0.0, rtol1=0.0, threshkind='soft', perc=None, decay=None, monitorres=False, show=False, itershow=(10, 10, 10), callback=None, preallocate=False)[source]¶
Iterative Shrinkage-Thresholding Algorithm (ISTA).
Solve an optimization problem with \(L^p, \; p=0, 0.5, 1\) regularization, given the operator
Opand datay. The operator can be real or complex, and should ideally be either square \(N=M\) or underdetermined \(N<M\).- Parameters:
- Op
pylops.LinearOperator Operator to invert
- y
numpy.ndarray Data of size \([N \times 1]\)
- x0: :obj:`numpy.ndarray`, optional
Initial guess
- niter
int Number of iterations
- SOp
pylops.LinearOperator, optional Regularization operator (use when solving the analysis problem)
- eps
float, optional Sparsity damping
- alpha
float, optional Step size. To guarantee convergence, ensure \(\alpha \le 1/\lambda_\text{max}\), where \(\lambda_\text{max}\) is the largest eigenvalue of \(\mathbf{Op}^H\mathbf{Op}\). If
None, the maximum eigenvalue is estimated and the optimal step size is chosen as \(1/\lambda_\text{max}\). If provided, the convergence criterion will not be checked internally.- eigsdict
dict, optional Dictionary of parameters to be passed to
pylops.LinearOperator.eigsmethod when computing the maximum eigenvalue- tol
float, optional Absolute tolerance on model update. Stop iterations if difference between inverted model at subsequent iterations is smaller than
tol- rtol
float, optional Relative tolerance on total cost function wrt initial total cost function. Stops the solver when the ratio of the current total cost function to the initial total cost function is below this value.
- rtol1
float, optional Relative tolerance on total cost function wrt to data. Stops the solver when the ratio of the current total cost function to the data norm is below this value.
- threshkind
str, optional Kind of thresholding (‘hard’, ‘soft’, ‘half’, ‘hard-percentile’, ‘soft-percentile’, or ‘half-percentile’ - ‘soft’ used as default)
- perc
float, optional Percentile, as percentage of values to be kept by thresholding (to be provided when thresholding is soft-percentile or half-percentile)
- decay
numpy.ndarray, optional Decay factor to be applied to thresholding during iterations
- monitorres
bool, optional Monitor that residual is decreasing
- show
bool, optional Display logs
- itershow
tuple, 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.
- callback
callable, optional Function with signature (
callback(x)) to call after each iteration wherexis the current model vector- preallocate
bool, optional Added in version 2.6.0.
Pre-allocate all variables used by the solver. Note that if
yis a JAX array, this option is ignored and variables are not pre-allocated since JAX does not support in-place operations.
- Op
- Returns:
- xinv
numpy.ndarray Inverted model
- niter
int Number of effective iterations
- cost
numpy.ndarray History of cost (including regularization term)
- xinv
- Raises:
- NotImplementedError
If
threshkindis different from hard, soft, half, soft-percentile, or half-percentile- ValueError
If
perc=Nonewhenthreshkindis soft-percentile or half-percentile- ValueError
If
monitorres=Trueand residual increases
See also
OMPOrthogonal Matching Pursuit (OMP).
FISTAFast Iterative Shrinkage-Thresholding Algorithm (FISTA).
SPGL1Spectral Projected-Gradient for L1 norm (SPGL1).
SplitBregmanSplit Bregman for mixed L2-L1 norms.
Notes