[SciPy-User] Question about errors (uncertainties) in non-linear least squares fitting (Jonathan Helmus)
Tue Aug 14 10:04:53 CDT 2012
On Mon, 13 Aug 2012 15:01:05 -0400 Jonathan Helmus <firstname.lastname@example.org> wrote:
> leastsqbound cannot fix a parameter. If you want a fixed parameter
> in the fit you can either rewrite your fitting/error function to take
> the fixed parameters as an extra argument, or use a more "full featured"
> constrained least squares fitting package like lmfit
> (http://newville.github.com/lmfit-py/) whose class based Parameters
> allow for additional control.
> For any aspiring developers out there, fixed parameter could be
> added to leastsqbound (although it wouldn't be easy) but I'm not
> planning on add it in the near term. I would accept a patch which added
> - Jonathan Helmus
Reading this conversation with Pawel over the past week or so, I was
reminded and re-inspired to fix the setting of bounds in lmfit-py
which had been pretty fragile to use the much more robust MINUT-style
transformations for min/max bounds as Jonathan did in leastsqbound.
Lmfit-py version 0.6.0 borrows heavily from leastsqbound (thanks
Jonathan!) for it's implementation of setting bounds, and also
includes the ability for users to change whether parameters in the
fitting model are fixed or varied, and to set up simple mathematical
constraints between parameters. It also provides support tools for
more thoroughly investigating confidence intervals beyond the simple
use of the covariance matrix (thanks to Till Stensitzki!).
This latest version is now available from
with the development version at
Feedback, suggestions, and bug reports are most welcome.
--Matt Newville <newville at cars.uchicago.edu>
More information about the SciPy-User