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