pylops.optimization.cls_basic.LSQRยถ
- class pylops.optimization.cls_basic.LSQR[source]ยถ
Solve an overdetermined system of equations given an operator
Opand datayusing LSQR iterations.\[\DeclareMathOperator{\cond}{cond}\]- Parameters:
- Op
pylops.LinearOperator Operator to invert of size \([N \times M]\)
- Op
- Attributes:
- ncp
module Array module used by the solver (obtained via
pylops.utils.backend.get_array_module) ). Available only aftersetupis called.- isjax
bool True if the input data is a JAX array. Available only after
setupis called and updated at each call tostep.- var
numpy.ndarrayorNone Variance vector of size \([M \times 1]\). Available only after
setupis called and updated at each call tostep. Set toNoneifcalc_var=False.- istop
int Gives the reason for termination. Available only after
setupis called and updated at each call tostep.- ctol
float Tolerance on the condition number of the augmented system (defined as reciprocal of
conlim`). Available only after ``setupis called and updated at each call tostep.- anorm
float Estimate of Frobenius norm of \(\overline{\mathbf{Op}} = [\mathbf{Op} \; \epsilon \mathbf{I}]\). Available only after
setupis called and updated at each call tostep.- acond
float Estimate of \(\cond(\overline{\mathbf{Op}})\). Available only after
setupis called and updated at each call tostep.- arnorm
float Estimate of norm of \(\cond(\mathbf{Op}^H\mathbf{r}- \epsilon^2\mathbf{x})\). Available only after
stepis called for the first time and updated at each subsequent call tostep.- xnorm
float \(||\mathbf{x}||_2\). Available only after
setupis called and updated at each call tostep.- u
numpy.ndarray Temporary vector of size \([N \times 1]\). Available only after
setupis called and updated at each call tostep.- v
numpy.ndarray Temporary vector of size \([M \times 1]\). Available only after
setupis called and updated at each call tostep.- w
numpy.ndarray Temporary vector of size \([M \times 1]\). Available only after
setupis called and updated at each call tostep.- dk
numpy.ndarray Temporary vector of size \([M \times 1]\). Available only after
setupis called and updated at each call tostep.- w1
numpy.ndarray Temporary vector of size \([M \times 1]\). Available only after
setupis called and updated at each call tostep.- alfa
float \(\alpha\) parameter of the bidiagonalization process. Available only after
setupis called and updated at each call tostep.- beta
float \(\beta\) parameter of the bidiagonalization process. Available only after
setupis called and updated at each call tostep.- arnorm0
float Initial value of
arnorm. Available only aftersetupis called.- rhobar
float Parameter of the QR factorization of the bidiagonal matrix. Available only after
setupis called and updated at each call tostep.- phibar
float Parameter of the QR factorization of the bidiagonal matrix. Available only after
setupis called and updated at each call tostep.- bnorm
float \(||\mathbf{y}||_2\). Available only after
setupis called and updated at each call tostep.- rnorm
float \(||\mathbf{r}||_2\). Available only after
setupis called and updated at each call tostep.- r1norm
float \(||\mathbf{r}||_2\), where \(\mathbf{r} = \mathbf{y} - \mathbf{Op}\,\mathbf{x}\). Available only after
setupis called and updated at each call tostep.- r2norm
float \(\sqrt{\mathbf{r}^T\mathbf{r} + \epsilon^2 \mathbf{x}^T\mathbf{x}}\). Equal to
r1normif \(\epsilon=0\). Available only aftersetupis called and updated at each call tostep.- cost
numpy.ndarray, optional History of r1norm through iterations
- iiter
int Current iteration number. Available only after
setupis called and updated at each call tostep.
- ncp
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