[SciPy-User] ANN: lmfit 0.7
Wed Sep 19 16:31:19 CDT 2012
I've posted version 0.7 of lmfit-py, which extends the code of
scipy.optimize to support optimization problems to use Parameters
which can take bounds, be frozen, or written as algebraic constraints.
Version 0.7 fixes a few bugs and adds two new improvements in functionality:
a) If the uncertainties package
(http://packages.python.org/uncertainties/) is available,
uncertainties will be propagated to constrained parameters
b) Support for many scalar optimization methods from
scipy.optimize.minimize() (scipy 0.11 and higher). While 'leastsq' is
still the default fitting method (and the only one that automatically
calculates uncertainties in optimized parameters), this allows feature
allows easy comparison of different fitting methods. While the
objective function for the scalar methods are intended to return a
scalar value, if a numpy.ndarray is returned by the objective
function, the sum-of-squares (array*array).sum() will be used. This
permits the same objective function to be used for all methods. Of
course, if an objective function returns a scalar value, it will work
correctly for the scalar minimization methods.
While some of the methods supported by scipy.optimize.minimize()
have some way to support constraints or bounds, these features of
these methods are not supported in lmfit. That is to say, these are
not necessary with lmfit as the Parameters used in lmdit already have
these features. In effect lmfit provides *all* fitting methods with a
consistent way to specify constraints and Parameter bounds, including
those methods (Levenberg-Marquardt, Nelder-Mead, etc) that don't
natively support them.
Code is available at http://pypi.python.org/pypi/lmfit/ and
Documentation is at http://newville.github.com/lmfit-py/
Any feedback, bug reports, and suggestions are welcome.
More information about the SciPy-User