LevMarLSQFitter¶
- class astropy.modeling.fitting.LevMarLSQFitter(calc_uncertainties=False)[source]¶
Bases:
astropy.modeling.fitting._NonLinearLSQFitter
Levenberg-Marquardt algorithm and least squares statistic.
- Parameters
- calc_uncertaintiesbool
If the covarience matrix should be computed and set in the fit_info. Default: False
Notes
The
fit_info
dictionary contains the values returned byscipy.optimize.leastsq
for the most recent fit, including the values from theinfodict
dictionary it returns. See thescipy.optimize.leastsq
documentation for details on the meaning of these values. Note that thex
return value is not included (as it is instead the parameter values of the returned model). Additionally, one additional element offit_info
is computed whenever a model is fit, with the key ‘param_cov’. The corresponding value is the covariance matrix of the parameters as a 2D numpy array. The order of the matrix elements matches the order of the parameters in the fitted model (i.e., the same order asmodel.param_names
).- Attributes
- fit_info
python:dict
The
scipy.optimize.leastsq
result for the most recent fit (see notes).
- fit_info