inversion_ideas.directives.Irls#
- class inversion_ideas.directives.Irls(*args, data_misfit, regularization_with_beta=None, chi_l2_target=1.0, beta_cooling_factor=2.0, data_misfit_rtol=0.1, cool_beta=True)#
Apply iterative reweighed least squares (IRLS).
This directive is intended to work with a single inversion that performs the two stages.
Note
This directive can only be applied to sparse (lp norm) regularizations. In summary they should:
have a
irlsbool attribute,have a
update_irlsand aactivate_irlsmethods.
- Parameters:
- *argsObjective
Sparse regularizations that will get IRLS updated. It can be a single regularization object (e.g.
inversion_ideas.SmallnessSparse), ainversion_ideas.base.Combo, or ainversion_ideas.base.Scaled, or multiple of them.inversion_ideas.base.Comboandinversion_ideas.base.Scaledregularizations will be explored recursively to use regularizations terms that have sensitivity weights that can be updated.- data_misfitDataMisfit
Data misfit function that will be evaluated to decide whether to update the IRLS on
sparse, or to cool the multiplier ofregularization.- regularization_with_betaScaled or None, optional
Regularization that will get its multiplier cooled down. If a single
argis passed, it will be used as the regularization that will get its multiplier cooled down. Pass aregularization_with_betaif another regularization’s multiplier should be cooled down, or if multipleargsare passed.- chi_l2_targetfloat, optional
Target for the chi factor used in the first stage (L2 inversion). Once this target is reached, the IRLS will be activated.
- beta_cooling_factorfloat, optional
Cooling factor used to cool down the
regularization’s multiplier.- data_misfit_rtolfloat, optional
Relative tolerance for the data misfit. Used to compare the current value of the data misfit with its value after the stage one is finished.
- cool_betabool, optional
Whether to cool down beta during the IRLS process. If False, make sure you handle beta cooling in other way, like through other directive.
Warning
If False, the Irls directive won’t cool down beta during the inversions. This might prevent from reaching convergence. Make sure you handle beta cooling in other way, like through other directive.
Attributes
Current beta cooling factor.
Methods
__call__(model, iteration)Apply IRLS.
Attributes#
- Irls.beta_cooling_factor#
Current beta cooling factor.
Methods#
Methods documentation
- Irls.__call__(model, iteration)#
Apply IRLS.
Cool down beta or update IRLS depending on the values of the data misfit.