pylops.optimization.cls_basic.LSQRยถ

class pylops.optimization.cls_basic.LSQR[source]ยถ

Solve an overdetermined system of equations given an operator Op and data y using LSQR iterations.

\[\DeclareMathOperator{\cond}{cond}\]
Parameters:
Oppylops.LinearOperator

Operator to invert of size \([N \times M]\)

Attributes:
ncpmodule

Array module used by the solver (obtained via pylops.utils.backend.get_array_module) ). Available only after setup is called.

isjaxbool

True if the input data is a JAX array. Available only after setup is called and updated at each call to step.

varnumpy.ndarray or None

Variance vector of size \([M \times 1]\). Available only after setup is called and updated at each call to step. Set to None if calc_var=False.

istopint

Gives the reason for termination. Available only after setup is called and updated at each call to step.

ctolfloat

Tolerance on the condition number of the augmented system (defined as reciprocal of conlim`). Available only after ``setup is called and updated at each call to step.

anormfloat

Estimate of Frobenius norm of \(\overline{\mathbf{Op}} = [\mathbf{Op} \; \epsilon \mathbf{I}]\). Available only after setup is called and updated at each call to step.

acondfloat

Estimate of \(\cond(\overline{\mathbf{Op}})\). Available only after setup is called and updated at each call to step.

arnormfloat

Estimate of norm of \(\cond(\mathbf{Op}^H\mathbf{r}- \epsilon^2\mathbf{x})\). Available only after step is called for the first time and updated at each subsequent call to step.

xnormfloat

\(||\mathbf{x}||_2\). Available only after setup is called and updated at each call to step.

unumpy.ndarray

Temporary vector of size \([N \times 1]\). Available only after setup is called and updated at each call to step.

vnumpy.ndarray

Temporary vector of size \([M \times 1]\). Available only after setup is called and updated at each call to step.

wnumpy.ndarray

Temporary vector of size \([M \times 1]\). Available only after setup is called and updated at each call to step.

dknumpy.ndarray

Temporary vector of size \([M \times 1]\). Available only after setup is called and updated at each call to step.

w1numpy.ndarray

Temporary vector of size \([M \times 1]\). Available only after setup is called and updated at each call to step.

alfafloat

\(\alpha\) parameter of the bidiagonalization process. Available only after setup is called and updated at each call to step.

betafloat

\(\beta\) parameter of the bidiagonalization process. Available only after setup is called and updated at each call to step.

arnorm0float

Initial value of arnorm. Available only after setup is called.

rhobarfloat

Parameter of the QR factorization of the bidiagonal matrix. Available only after setup is called and updated at each call to step.

phibarfloat

Parameter of the QR factorization of the bidiagonal matrix. Available only after setup is called and updated at each call to step.

bnormfloat

\(||\mathbf{y}||_2\). Available only after setup is called and updated at each call to step.

rnormfloat

\(||\mathbf{r}||_2\). Available only after setup is called and updated at each call to step.

r1normfloat

\(||\mathbf{r}||_2\), where \(\mathbf{r} = \mathbf{y} - \mathbf{Op}\,\mathbf{x}\). Available only after setup is called and updated at each call to step.

r2normfloat

\(\sqrt{\mathbf{r}^T\mathbf{r} + \epsilon^2 \mathbf{x}^T\mathbf{x}}\). Equal to r1norm if \(\epsilon=0\). Available only after setup is called and updated at each call to step.

costnumpy.ndarray, optional

History of r1norm through iterations

iiterint

Current iteration number. Available only after setup is called and updated at each call to step.

Notes

Minimize the following functional using LSQR iterations [1]:

\[J = || \mathbf{y} - \mathbf{Op}\,\mathbf{x} ||_2^2 + \epsilon^2 || \mathbf{x} ||_2^2\]

where \(\epsilon\) is the damping coefficient.

[1]

Paige, C. C., and Saunders, M. A. โ€œLSQR: An algorithm for sparse linear equations and sparse least squaresโ€, ACM TOMS, vol. 8, pp. 43-71, 1982.

Methods

__init__(Op)

callback(x, *args, **kwargs)

Callback routine

finalize([show])

Finalize solver

memory_usage([show, unit])

Compute memory usage of the solver

run(x[, niter, show, itershow])

Run solver

setup(y[, x0, damp, atol, btol, conlim, ...])

Setup solver

solve(y[, x0, damp, atol, btol, conlim, ...])

Run entire solver

step(x[, show])

Run one step of solver