[AstroPy] Q re. function minimization

Peter Erwin erwin at mpe.mpg.de
Tue May 31 10:55:48 EDT 2011


On May 31, 2011, at 4:26 PM, Ian Crossfield wrote:

> What functions or wrappers do people use for minimizing a function in 
> multidimensional parameter space?  I have some experience with the 
> scipy.optimize subfunctions but I've never been entirely happy with 
> them; there also appear to be options in sage and a Python MPFIT.  What 
> I'd like is a method that lets one minimize a function but also allows 
> things like passed keyword arguments (unsupported in scipy.optimize) and 
> above all a way to minimize while holding specified parameters fixed -- 
> so that one can minimize over all parameters, and then repeat with some 
> parameters held constant without having to write an entirely new 
> function for each peculiar set of parameters.

Doesn't the Python version of MPFIT do that?
This implementation:

http://cars9.uchicago.edu/software/python/mpfit.html

has a "parinfo" keyword that allows you to keep specified parameters
fixed.

(It's basically a translation of Craig Markwardt's IDL MPFIT code into
Python; one of Craig's modifications to the original FORTRAN implementations
was to add parameter constraints.)

cheers,

Peter

> 
> Is anything that offers these features this out there?  How do people 
> deal with this?
> 
> Thanks,
> 
> -- 
> Ian Crossfield
> UCLA Astronomy
> KH 3-145J
> http://www.astro.ucla.edu/~ianc/
> 
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy

=============================================================
Peter Erwin                   Max-Planck-Insitute for Extraterrestrial 
erwin at mpe.mpg.de              Physics, Giessenbachstrasse
tel. +49 (0)89 30000 3695     85748 Garching, Germany
fax  +49 (0)89 30000 3495     http://www.mpe.mpg.de/~erwin






More information about the AstroPy mailing list