Return the statistic values for the current models.
Calculate the statistic value for each data set, and the combined fit, using the current set of models, parameters, and ranges.
stats – The values for each data set. If there are multiple model expressions then the last element will be the value for the combined data sets.
- Return type
Calculate the fit statistic for a data set.
Display the statistic values for the current models.
Return the results of the last fit.
List the identifiers for the loaded data sets.
List of all the data sets with a source expression.
If a fit to a particular data set has not been made, or values - such as parameter settings, the noticed data range, or choice of statistic - have been changed since the last fit, then the results for that data set may not be meaningful and will therefore bias the results for the simultaneous results.
The return value of
get_fit_resultssince it includes values for each data set, individually, rather than just the combined results.
The fields of the object include:
The name of the data set, or sets, as a string.
A sequence of the data set ids (it may be a tuple or array) included in the results.
A sequence of the background data set ids (it may be a tuple or array) included in the results, if any.
The name of the statistic function (as used in
The statistic value.
The number of bins used in the fits.
The number of degrees of freedom in the fit (the number of bins minus the number of free parameters).
The Q-value (probability) that one would observe the reduced statistic value, or a larger value, if the assumed model is true and the current model parameters are the true parameter values. This will be
Noneif the value can not be calculated with the current statistic (e.g. the Cash statistic).
The reduced statistic value (the
statvalfield divided by
dof). This is not calculated for all statistics.
>>> res = get_stat_info() >>> res.statval 498.21750663761935 >>> res.dof 439