BFGS

class zfit.minimize.BFGS(strategy=None, tolerance=1e-05, verbosity=5, max_calls=3000, name='BFGS_TFP', options=None)[source]

Bases: zfit.minimizers.baseminimizer.BaseMinimizer

# Todo write description for api.

Parameters
  • strategy (Optional[ZfitStrategy]) – Strategy that handles NaN and more (to come, experimental)

  • tolerance (float) – Difference between the function value that suffices to stop minimization

  • verbosity (int) – The higher, the more is printed. Between 1 and 10 typically

  • max_calls (int) – Maximum number of calls, approximate

  • name (str) – Name of the Minimizer

  • options (Optional[Mapping]) – A dict containing the options given to the minimization function, overriding the default

minimize(loss, params=None)

Fully minimize the loss with respect to params.

Parameters
  • loss (ZfitLoss) – Loss to be minimized.

  • params (Optional[Iterable[ZfitParameter]]) – The parameters with respect to which to minimize the loss. If None, the parameters will be taken from the loss.

Return type

FitResult

Returns

The fit result.

step(loss, params=None)

Perform a single step in the minimization (if implemented).

Parameters

params (Union[Iterable[ZfitParameter], None, Iterable[str]]) –

Returns:

Raises

MinimizeStepNotImplementedError – if the step method is not implemented in the minimizer.