[SciPy-user] parameter bounds using leastsq

Scott Ransom sransom at nrao.edu
Sat Nov 5 20:37:03 CST 2005


On Sat, Nov 05, 2005 at 06:07:56PM -0800, mike cantor wrote:
> Thanks Scott,
> 
> How do you think it compares in terms of speed with the SciPy 
> implementation that wraps C code?  Speed is a big concern for me.

Speed is its one downfall.  It is definitely much slower than
the SciPy leastsq (due to being completely done in C).  I guess
there probably wouldn't be such a huge hit if you had a complex
function to optimize which dominated the run time, but if that
is not the case, figuring out a workaround for leastsq will
probably be your best bet.

Scott

> At 05:51 PM 11/5/2005, you wrote:
> >Just to remind people, there is a very full featured non-linear
> >least squares fitter that is written in pure python (but based
> >on MINPACK) available here:
> >
> >http://cars9.uchicago.edu/software/python/mpfit.html
> >
> >It allows for constraints on paramters and gives error
> >estimates (computed from the covariance matrix) on the fitted
> >parameters in a convenient format.
> >
> >Scott
> >
> >
> >On Sat, Nov 05, 2005 at 05:27:00PM -0800, mike cantor wrote:
> > > Is there any way to enforce upper and/or lower bounds on parameters (x0)
> > > optimized by leastsq?  If not can anyone tell me where I might look to 
> > hack
> > > this?
> > >
> > > Thanks,
> > > -mike
> > >
> > > _______________________________________________
> > > SciPy-user mailing list
> > > SciPy-user at scipy.net
> > > http://www.scipy.net/mailman/listinfo/scipy-user
> >
> >--
> >--
> >Scott M. Ransom            Address:  NRAO
> >Phone:  (434) 296-0320               520 Edgemont Rd.
> >email:  sransom at nrao.edu             Charlottesville, VA 22903 USA
> >GPG Fingerprint: 06A9 9553 78BE 16DB 407B  FFCA 9BFA B6FF FFD3 2989
> >
> >_______________________________________________
> >SciPy-user mailing list
> >SciPy-user at scipy.net
> >http://www.scipy.net/mailman/listinfo/scipy-user
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user

-- 
-- 
Scott M. Ransom            Address:  NRAO
Phone:  (434) 296-0320               520 Edgemont Rd.
email:  sransom at nrao.edu             Charlottesville, VA 22903 USA
GPG Fingerprint: 06A9 9553 78BE 16DB 407B  FFCA 9BFA B6FF FFD3 2989



More information about the SciPy-user mailing list