[SciPy-User] Optimization methods for fitting ODEs

Ralf Gommers ralf.gommers at gmail.com
Wed Mar 11 10:15:03 EDT 2020


On Wed, Mar 11, 2020 at 2:42 PM David Hagen <david at drhagen.com> wrote:

> TL;DR: Anyone have a recommended optimization method for fitting ODEs to
> data when I have the analytic gradient?
>
> I am currently fitting the numeric solutions of ODEs to data. I wrote an
> objective function, a gradient on that objective function, and passed both
> to scipy.optimize.minimize. This worked fine on small problems, but all the
> scipy minimize methods broke down when the number of parameters got large
> (~40). My past experience in Matlab suggests that this happens because some
> parameter directions are MUCH more tightly constrained than others.
>
> The scipy methods are easy-to-use, but I was wondering if there were any
> alternatives that people had found to work well when the problem got too
> hard for scipy. Here is a list of features that I probably need:
>
> * black-box optimizer
> * local optimizer
> * uses supplied analytic gradient
> * allows bounds on parameters
> * accepts a maximum step size
>

I like Emcee (https://emcee.readthedocs.io/en/stable/tutorials/line/) for
fitting ODEs to data.

I'm not sure I fully understand what you mean by using the gradient. If you
have the analytic gradient, I assume you also have the solution to the ODE,
or you can at least numerically integrate the gradient to get that
solution. So at that point there's no need to solve the ODE during the
fitting process?

Cheers,
Ralf



> _______________________________________________
> SciPy-User mailing list
> SciPy-User at python.org
> https://mail.python.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20200311/10ccad11/attachment.html>


More information about the SciPy-User mailing list