- pylops.optimization.sparsity.irls(Op, y, x0=None, nouter=10, threshR=False, epsR=1e-10, epsI=1e-10, tolIRLS=1e-10, warm=False, kind='data', show=False, itershow=(10, 10, 10), callback=None, **kwargs_solver)#
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
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.
Operator to invert
Number of outer iterations
Apply thresholding in creation of weight (
True) or damping (
Damping to be applied to residuals for weighting term
Tolerance. Stop outer iterations if difference between inverted model at subsequent iterations is smaller than
Warm start each inversion inner step with previous estimate (
True) or not (
False). This only applies to
Kind of solver (
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.
Function with signature (
callback(x)) to call after each iteration where
xis the current model vector
Arbitrary keyword arguments for
scipy.sparse.linalg.cgsolver for data IRLS and
scipy.sparse.linalg.lsqrsolver for model IRLS when using numpy data(or
pylops.optimization.solver.cglswhen using cupy data)