pylops.optimization.leastsquares.regularized_inversion#
- pylops.optimization.leastsquares.regularized_inversion(Op, y, Regs, x0=None, Weight=None, dataregs=None, epsRs=None, engine='scipy', show=False, **kwargs_solver)[source]#
Regularized inversion.
Solve a system of regularized equations given the operator
Op
, a data weighting operatorWeight
, and a list of regularization termsRegs
.- Parameters
- Op
pylops.LinearOperator
Operator to invert of size \([N \times M]\)
- y
numpy.ndarray
Data of size \([N \times 1]\)
- Regs
list
Regularization operators (
None
to avoid adding regularization)- x0
numpy.ndarray
, optional Initial guess of size \([M \times 1]\)
- Weight
pylops.LinearOperator
, optional Weight operator
- dataregs
list
, optional Regularization data (if
None
a zero data will be used for every regularization operator inRegs
)- epsRs
list
, optional Regularization dampings
- engine
str
, optional Solver to use (
scipy
orpylops
)- show
bool
, optional Display normal equations solver log
- **kwargs_solver
Arbitrary keyword arguments for chosen solver (
scipy.sparse.linalg.lsqr
andpylops.optimization.solver.cgls
are used for enginescipy
andpylops
, respectively)
- Op
- Returns
- xinv
numpy.ndarray
Inverted model.
- istop
int
Gives the reason for termination
1
means \(\mathbf{x}\) is an approximate solution to \(\mathbf{y} = \mathbf{Op}\,\mathbf{x}\)2
means \(\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
r1norm
if \(\epsilon=0\)
- xinv
See also
RegularizedOperator
Regularized operator
NormalEquationsInversion
Normal equations inversion
PreconditionedInversion
Preconditioned inversion
Notes
See
pylops.optimization.cls_leastsquares.RegularizedInversion