inversion_ideas.conditions.ObjectiveChanged#

class inversion_ideas.conditions.ObjectiveChanged(objective_function, rtol=0.001, atol=0.0)#

Stopping criterion for when an objective function didn’t changed above a tolerance.

Parameters:
objective_functionObjective

Objective function that will be evaluated.

rtolfloat, optional

Relative tolerance below which the model will be considered of not changing enough.

atolfloat, optional

Absolute tolerance below which the model will be considered of not changing enough.

Methods

__call__(model)

Call self as a function.

info(model)

Display information about the condition for a given model.

initialize()

Initialize condition and clean previous attribute.

ratio(model)

Ratio |φ(m) - φ(m_prev)|/|φ(m_prev)|.

update(model)

Cache value of objective function with model as the previous one.

Notes

The stopping criterion evaluates:

\[\frac{ | \phi(\mathbf{m}) - \phi(\mathbf{m}_\text{old}) | }{ | \phi(\mathbf{m}_\text{old}) | } \le \delta_r,\]

and

\[| \phi(\mathbf{m}) - \phi(\mathbf{m}_\text{old}) | \le \delta_a,\]

where \(\phi\), is the objective function, \(\mathbf{m}\) is the current model, \(\mathbf{m}_\text{old}\) is the previous model in the inversion, and \(\delta_r\) and \(\delta_a\) are the relative and absolute tolerances whose values are given by rtol and atol, respectively.

When called, if any of those inequalities hold, the stopping criterion will return True, and False otherwise.

Methods#

Methods documentation

ObjectiveChanged.__call__(model)#

Call self as a function.


ObjectiveChanged.info(model)#

Display information about the condition for a given model.


ObjectiveChanged.initialize()#

Initialize condition and clean previous attribute.


ObjectiveChanged.ratio(model)#

Ratio |φ(m) - φ(m_prev)|/|φ(m_prev)|.


ObjectiveChanged.update(model)#

Cache value of objective function with model as the previous one.