FitResults
- class sherpa.fit.FitResults(fit, results, init_stat, param_warnings)[source] [edit on github]
Bases:
NoNewAttributesAfterInit
The results of a fit.
This object contains the parameter values, information on the statistic and optimisation-method used, and other relevant information.
Changed in version 4.10.1: The
covarerr
attribute has been renamed tocovar
and now contains the covariance matrix estimated at the best-fit location, if provided by the optimiser.- datasets
A sequence of the data set ids included in the results.
- Type
sequence of int or str, or None
- parnames
the parameter names that were varied in the fit (the thawed parameters in the model expression).
- Type
tuple of str
- statval
The statistic value after the fit.
- Type
number
- istatval
The statistic value at the start of the fit.
- Type
number
- dstatval
The change in the statistic value (
istatval - statval
).- Type
number
- dof
The number of degrees of freedom in the fit (the number of bins minus the number of free parameters).
- Type
- qval
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
None
if the value can not be calculated with the current statistic (e.g. the Cash statistic).- Type
number or None
- rstat
The reduced statistic value (the
statval
field divided bydof
). This is not calculated for all statistics.- Type
number or None
- message
A message about the results of the fit (e.g. if the fit was unable to converge). The format and contents depend on the optimisation method.
- Type
- extra_output
The
extra_output
field from the fit.
- covar
The covariance matrix from the best-fit location, if provided by the optimiser.
- Type
tuple or None
Methods Summary
format
()Return a string representation of the fit results.
Methods Documentation
- format()[source] [edit on github]
Return a string representation of the fit results.
- Returns
txt – A multi-line representation of the fit results.
- Return type