errors¶
-
exception
zfit.minimizers.errors.
NewMinimum
[source]¶ Bases:
Exception
Exception class for cases where a new minimum is found.
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
zfit.minimizers.errors.
compute_errors
(result, params, sigma=1, rootf=<function _rootf>, rtol=0.01)[source]¶ Computes asymmetric errors of parameters by profiling the loss function in the fit result.
Parameters: - result (FitResult) – fit result
- params (list(
Parameter
)) – The parameters to calculate the errors error. If None, use all parameters. - sigma (float) – Errors are calculated with respect to sigma std deviations.
- rootf (callable) – function used to find the roots of the loss function
- rtol (float, default=0.01) – relative tolerance between the computed and the exact roots
Returns: - A OrderedDict containing as keys the parameter and as value a dict which
contains two keys ‘lower’ and ‘upper’, holding the calculated errors. Example: result[par1][‘upper’] -> the asymmetric upper error of ‘par1’
FitResult or None: a fit result is returned when a new minimum is found during the loss scan
Return type: OrderedDict
-
zfit.minimizers.errors.
get_crossing_value
(result, params, direction, sigma, rootf, rtol)[source]¶ Find the crossing point between the profiled loss function, for given parameters, and the value of errordef for a given direction (positive / negative). errordef = 1 for a chisquare fit, = 0.5 for a likelihood fit.