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:

  1. have a irls bool attribute,

  2. have a update_irls and a activate_irls methods.

Parameters:
*argsObjective

Sparse regularizations that will get IRLS updated. It can be a single regularization object (e.g. inversion_ideas.SmallnessSparse), a inversion_ideas.base.Combo, or a inversion_ideas.base.Scaled, or multiple of them. inversion_ideas.base.Combo and inversion_ideas.base.Scaled regularizations 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 of regularization.

regularization_with_betaScaled or None, optional

Regularization that will get its multiplier cooled down. If a single arg is passed, it will be used as the regularization that will get its multiplier cooled down. Pass a regularization_with_beta if another regularization’s multiplier should be cooled down, or if multiple args are 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

beta_cooling_factor

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.