[AstroPy] Q re. function minimization

Brian Refsdal brefsdal at head.cfa.harvard.edu
Tue May 31 10:47:01 EDT 2011


If you're looking to easily hold parameters fixed, you might look at 
Sherpa.  Sherpa includes minimizers comparable to scipy.optimize and the 
documentation includes examples of user-defined functions.  Sherpa even 
has methods for computing confidence limits on model parameters like MINUIT.


http://pysherpa.blogspot.com/2010/11/user-defined-model-and-fit-statistic.html
http://cxc.cfa.harvard.edu/contrib/sherpa/

Brian



On 05/31/2011 10:26 AM, 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.
>
> Is anything that offers these features this out there?  How do people
> deal with this?
>
> Thanks,
>




More information about the AstroPy mailing list