minimizer_minuit¶
-
class
zfit.minimizers.minimizer_minuit.
Minuit
(strategy: zfit.minimizers.baseminimizer.ZfitStrategy = None, minimize_strategy: int = 1, tolerance: float = None, verbosity: int = 5, name: str = None, ncall: int = 10000, use_minuit_grad: bool = None, **minimizer_options)[source]¶ Bases:
zfit.minimizers.baseminimizer.BaseMinimizer
,zfit.util.cache.GraphCachable
Parameters: - () (strategy) – A
ZfitStrategy
object that defines the behavior of - minimizer in certain situations. (the) –
- minimize_strategy (int) – A number used by minuit to define the strategy, either 0, 1 or 2.
- tolerance (float) – Stopping criteria: the Estimated Distance to Minimum (EDM) has to be lower then tolerance
- verbosity (int) – Regulates how much will be printed during minimization. Values between 0 and 10 are valid.
- name (str) – Name of the minimizer
- ncall (int) – Maximum number of minimization steps.
- use_minuit_grad (bool) – If True, iminuit uses it’s internal numerical gradient calculation instead of the (analytic/numerical) gradient provided by TensorFlow/zfit.
-
add_cache_deps
(cache_deps: Union[zfit.core.interfaces.ZfitCachable, Iterable[zfit.core.interfaces.ZfitCachable]], allow_non_cachable: bool = True)¶ Add dependencies that render the cache invalid if they change.
Parameters: - cache_deps (ZfitGraphCachable) –
- allow_non_cachable (bool) – If True, allow cache_dependents to be non-cachables. If False, any cache_dependents that is not a ZfitCachable will raise an error.
Raises: TypeError
– if one of the cache_dependents is not a ZfitCachable _and_ allow_non_cachable if False.
-
graph_caching_methods
= []¶
-
instances
= <_weakrefset.WeakSet object>¶
-
minimize
(loss: zfit.core.interfaces.ZfitLoss, params: Optional[Iterable[zfit.core.interfaces.ZfitParameter]] = None) → zfit.minimizers.fitresult.FitResult¶ Fully minimize the loss with respect to params.
Parameters: - loss (ZfitLoss) – Loss to be minimized.
- params (list(zfit.Parameter) – The parameters with respect to which to minimize the loss. If None, the parameters will be taken from the loss.
Returns: The fit result.
Return type: FitResult
-
register_cacher
(cacher: Union[zfit.core.interfaces.ZfitCachable, Iterable[zfit.core.interfaces.ZfitCachable]])¶ Register a cacher that caches values produces by this instance; a dependent.
Parameters: () (cacher) –
-
reset_cache
(reseter: zfit.util.cache.ZfitGraphCachable)¶
-
reset_cache_self
()¶ Clear the cache of self and all dependent cachers.
-
step
(loss, params: Union[Iterable[zfit.core.interfaces.ZfitParameter], None, Iterable[str]] = None)¶ Perform a single step in the minimization (if implemented).
Parameters: () (params) – Returns:
Raises: MinimizeStepNotImplementedError
– if the step method is not implemented in the minimizer.
-
tolerance
¶
- () (strategy) – A