pylops.optimization.leastsquares.preconditioned_inversion¶
- pylops.optimization.leastsquares.preconditioned_inversion(Op, y, P, x0=None, engine='scipy', show=False, **kwargs_solver)[source]¶
Preconditioned inversion.
Solve a system of preconditioned equations given the operator
Opand a preconditionerP.- Parameters:
- Op
pylops.LinearOperator Operator to invert of size \([N \times M]\)
- y
numpy.ndarray Data of size \([N \times 1]\)
- P
pylops.LinearOperator Preconditioner
- x0
numpy.ndarray Initial guess of size \([M \times 1]\)
- engine
str, optional Solver to use (
scipyorpylops)- show
bool, optional Display normal equations solver log
- **kwargs_solver
Arbitrary keyword arguments for chosen solver (
scipy.sparse.linalg.lsqrandpylops.optimization.solver.cglsare used as default for numpy and cupy data, respectively)
- Op
- Returns:
- xinv
numpy.ndarray Inverted model.
- istop
int Gives the reason for termination
1means \(\mathbf{x}\) is an approximate solution to \(\mathbf{y} = \mathbf{Op}\,\mathbf{x}\)2means \(\mathbf{x}\) approximately solves the least-squares problem- itn
int Iteration number upon termination
- r1norm
float \(||\mathbf{r}||_2^2\), where \(\mathbf{r} = \mathbf{y} - \mathbf{Op}\,\mathbf{x}\)
- r2norm
float \(\sqrt{\mathbf{r}^T\mathbf{r} + \epsilon^2 \mathbf{x}^T\mathbf{x}}\). Equal to
r1normif \(\epsilon=0\)
- xinv
See also
RegularizedInversionRegularized inversion
NormalEquationsInversionNormal equations inversion
Notes
See
pylops.optimization.cls_leastsquares.PreconditionedInversion