PushbackStrategy#

class zfit.minimize.PushbackStrategy#

Bases: zfit.minimizers.strategy.BaseStrategy

Pushback by adding nan_penalty * counter to the loss if NaNs are encountered.

The counter indicates how many NaNs occurred in a row. The nan_tol is the upper limit, if this is exceeded, the fallback will be used and an error is raised.

Parameters
  • nan_penalty – Value to add to the previous loss in order to penalize the step taken.

  • nan_tol – If the number of NaNs encountered in a row exceeds this number, the fallback is used.