[SciPy-User] efficiency of the simplex routine: R (optim) vs scipy.optimize.fmin

Joon Ro joonpyro at gmail.com
Fri May 10 00:11:25 EDT 2013


Hi Arnaldo,


On Thu, May 9, 2013 at 4:43 PM, Arnaldo Russo <arnaldorusso at gmail.com>wrote:

>
> I didn't understand.
> I thought that the output was the solution of my best values of "alpha",
> "beta" and "gama".
> But a much lower value of gama is a best choice? The R solver picked a
> double value while comparing with python results.
> I'm asking these things because I want to plot a fit curve with these
> parameters and I don't know how.
>
>
The solver tries to find the parameter (alpha, beta, gama) values which
minimizes the sum squared value of the return of your function, `pp_min()`.
When I try the Python and R solution:

   sum(pp_min(array([  9.82259647e-02,  -1.58338152e-02,
5.03125198e+01]), x, y), axis=0)
   Out[23]: 153.42871102569131

    >>> pp_R = array([0.09157204,   0.02129695, 148.89173924])

   sum(pp_min(pp_R, x, y), axis=0)
   Out[21]: 155.07002552970221

So it seems like Python solver found better solution than the R one. You
might want to fix alpha, beta parameters and draw plots with different
values of gama to see what is going on.

Best,
Joon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20130509/9cae1ec0/attachment.html>


More information about the SciPy-User mailing list