pylops.optimization.leastsquares.RegularizedInversion¶
-
pylops.optimization.leastsquares.RegularizedInversion(Op, Regs, data, Weight=None, dataregs=None, epsRs=None, x0=None, returninfo=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
- Regs :
list Regularization operators (
Noneto avoid adding regularization)- data :
numpy.ndarray Data
- Weight :
pylops.LinearOperator, optional Weight operator
- dataregs :
list, optional Regularization data (if
Nonea zero data will be used for every regularization operator inRegs)- epsRs :
list, optional Regularization dampings
- x0 :
numpy.ndarray, optional Initial guess
- returninfo :
bool, optional Return info of LSQR solver
- **kwargs_solver
Arbitrary keyword arguments for chosen solver (
scipy.sparse.linalg.lsqrandpylops.optimization.solver.cglsare used as default for numpy and cupy data, respectively)
Returns: - xinv :
numpy.ndarray Inverted model.
- istop :
int Gives the reason for termination
1means \(\mathbf{x}\) is an approximate solution to \(\mathbf{d} = \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{d} - \mathbf{Op}\,\mathbf{x}\)
- r2norm :
float \(\sqrt{\mathbf{r}^T\mathbf{r} + \epsilon^2 \mathbf{x}^T\mathbf{x}}\). Equal to
r1normif \(\epsilon=0\)
See also
RegularizedOperator- Regularized operator
NormalEquationsInversion- Normal equations inversion
PreconditionedInversion- Preconditioned inversion
Notes
Solve the following system of regularized equations given the operator \(\mathbf{Op}\), a data weighting operator \(\mathbf{W}^{1/2}\), a list of regularization terms \(\mathbf{R}_i\), the data \(\mathbf{d}\) and regularization damping factors \(\epsilon_\mathbf{I}\): and \(\epsilon_{\mathbf{R}_i}\):
\[\begin{split}\begin{bmatrix} \mathbf{W}^{1/2} \mathbf{Op} \\ \epsilon_{\mathbf{R}_1} \mathbf{R}_1 \\ \vdots \\ \epsilon_{\mathbf{R}_N} \mathbf{R}_N \end{bmatrix} \mathbf{x} = \begin{bmatrix} \mathbf{W}^{1/2} \mathbf{d} \\ \epsilon_{\mathbf{R}_1} \mathbf{d}_{\mathbf{R}_1} \\ \vdots \\ \epsilon_{\mathbf{R}_N} \mathbf{d}_{\mathbf{R}_N} \\ \end{bmatrix}\end{split}\]where the
Weightprovided here is equivalent to the square-root of the weight inpylops.optimization.leastsquares.NormalEquationsInversion. Note that this system is solved using thescipy.sparse.linalg.lsqrand an initial guessx0can be provided to this solver, despite the original solver does not allow so.- Op :