pylops.optimization.sparsity.irls(Op, y, x0=None, nouter=10, threshR=False, epsR=1e-10, epsI=1e-10, tolIRLS=1e-10, kind='data', show=False, itershow=[10, 10, 10], callback=None, **kwargs_solver)[source]

Iteratively reweighted least squares.

Solve an optimization problem with \(L_1\) cost function (data IRLS) or \(L_1\) regularization term (model IRLS) given the operator Op and data y.

In the data IRLS, the cost function is minimized by iteratively solving a weighted least squares problem with the weight at iteration \(i\) being based on the data residual at iteration \(i-1\). This IRLS solver is robust to outliers since the L1 norm given less weight to large residuals than L2 norm does.

Similarly in the model IRLS, the weight at at iteration \(i\) is based on the model at iteration \(i-1\). This IRLS solver inverts for a sparse model vector.

Op : pylops.LinearOperator

Operator to invert

data : numpy.ndarray


x0 : numpy.ndarray, optional

Initial guess

nouter : int, optional

Number of outer iterations

threshR : bool, optional

Apply thresholding in creation of weight (True) or damping (False)

epsR : float, optional

Damping to be applied to residuals for weighting term

espI : float, optional

Tikhonov damping

tolIRLS : float, optional

Tolerance. Stop outer iterations if difference between inverted model at subsequent iterations is smaller than tolIRLS

kind : str, optional

Kind of solver (data or model)

show : bool, optional

Display logs

itershow : list, 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 where x is the current model vector


Arbitrary keyword arguments for solver for data IRLS and scipy.sparse.linalg.lsqr solver for model IRLS when using numpy data(or and pylops.optimization.solver.cgls when using cupy data)

xinv : numpy.ndarray

Inverted model

nouter : int

Number of effective outer iterations


See pylops.optimization.cls_sparsity.IRLS

Examples using pylops.optimization.sparsity.irls