class zfit.minimizers.baseminimizer.PushbackStrategy(nan_penalty=100, nan_tolerance=30, **kwargs)[source]

Bases: zfit.minimizers.baseminimizer.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_tolerance is the upper limit, if this is exceeded, the fallback will be used and an error is raised.

  • nan_penalty (Union[float, int]) – Value to add to the previous loss in order to penalize the step taken.

  • nan_tolerance (int) – If the number of NaNs encountered in a row exceeds this number, the fallback is used.