FitResults¶
-
class
sherpa.fit.
FitResults
(fit, results, init_stat, param_warnings)[source]¶ Bases:
sherpa.utils.NoNewAttributesAfterInit
The results of a fit.
This object contains the parameter values, information on the statistic and optimisation-method used, and other relevant information.
-
datasets
¶ sequence of int or str, or None – A sequence of the data set ids included in the results.
-
itermethodname
¶ str or None – What iterated-fit scheme was used, if any.
-
methodname
¶ str – The name of the optimisation method used (in lower case).
-
statname
¶ str – The name of the statistic function.
-
succeeded
¶ bool – Was the fit successful (did it converge)?
-
parnames
¶ tuple of str – the parameter names that were varied in the fit (the thawed parameters in the model expression).
-
parvals
¶ tuple of number – The parameter values, in the same order as parnames.
-
statval
¶ number – The statistic value after the fit.
-
istatval
¶ number – The statistic value at the start of the fit.
-
dstatval
¶ number – The change in the statistic value (istatval - statval).
-
numpoints
¶ int – The number of bins used in the fits.
-
dof
¶ int – The number of degrees of freedom in the fit (the number of bins minus the number of free parameters).
-
qval
¶ number or None – 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).
-
rstat
¶ number or None – The reduced statistic value (the statval field divided by dof). This is not calculated for all statistics.
-
message
¶ str – 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.
-
nfev
¶ int – The number of model evaluations made during the fit.
-
extra_output
¶ The
extra_output
field from the fit.
-
covarerr
¶ tuple or None – The
covarerr
field from the fit, if available.
-
modelvals
¶ NumPy array – The values of the best-fit model evaluated for the data.
Methods Summary
format
()Return a string representation of the fit results. Methods Documentation
-