[SciPy-Dev] A few minor changes to distributions .fit and scipy.optimize

Charles R Harris charlesr.harris@gmail....
Mon Jun 28 18:52:52 CDT 2010


On Mon, Jun 28, 2010 at 5:12 PM, Travis Oliphant <oliphant@enthought.com>wrote:

>
> There was some recent discussion about the fact that the .fit functions
> only use the Nelder Mead fmin algorithm, and that the .fit functions do not
> allow dependency on other variables.
>
> I would like to check in a quick change to allow an optimizer keyword to
> the function which can take any optimizer which accepts a similar interface
> (and I've changed all the fmin_ style optimizers to adjust the few that have
> trickled in over the past few years which did not have a disp= keyword).
>
> Comments on this are welcome.   It is a simple enough change that it seems
> appropriate to just check-it in.
>
>
> Regarding the matter of parameterization of the shape and location or scale
> variables:  I think it would be straightforward to use a similar mechanism
> that allows one to now fix the shape, location, or scale parameters during
> the optimization, to allow for these variables to be parameterized by
> additional independent variables via a function.   In other words, instead
> of fixing the value of shape, location, or scale, you could specify that
> this parameter should be a specific function of some other variables.
>
> Then, the optimization would proceed using these underlying functions.
>  This interface should also be flexible enough to allow you to specify a
> function that returns several of the shape, location, and/or scale values
> given the same set of underlying functions.
>
> I'm thinking of merging this with the fixing of the parameters approach
> using a couple of object factory functions that are passed in via a single
> keyword argument to the .fit function.  This would be a simple yet
> sufficiently flexible approach.   I don't have a great name for the keyword
> function, perhaps params
>
> # s0..sn fix any shape parameters
> .fit(data, params=fix(s1=3,loc=4))
>
> and
>
> .fit(data, params=expand(s1=func, loc=(func3, start)))   # passing a tuple
> in fixes starting guess for underlying function.
>
> TBD:  how to specify a function that returns several of the parameters:
>  perhaps a keyword with names strung together:  s0_loc_scale = func4
>
>
>
I think you should wait a bit on the checkin so that there is time for
comments to make their way to the list. I'm not involved in this area of
scipy, but this looks to be setting up a higher level interface and I think
it needs to be thrashed out a bit.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20100628/bda9343d/attachment.html 


More information about the SciPy-Dev mailing list