[SciPy-User] Fitting a system of ODEs to data

Rob Clewley rob.clewley at gmail.com
Thu Sep 10 10:45:57 EDT 2009


On Thu, Sep 10, 2009 at 10:19 AM, C. Campbell <lujitsu at hotmail.com> wrote:
> I have a system of coupled multivariate ODEs which I would like to fit to
> experimental data. If I am reading the SciPy documentation correctly, there
> exist built in functions to handle systems of multivariate nonlinear
> functions (Broyden's and Anderson's methods), but not systems of ODEs. After
> reading up on some general methods, it looks like it would be a real bear to
> write an implementation myself.

It depends on how you want to set up your optimization problem, but
the existing minimization codes in scipy are reasonably good at doing
just this. I think the idea that you are missing is that you would
need to write an objective function for these solvers that computes an
ODE orbit and compares it with your data, according to whatever metric
you prefer. A common technique does not require multivariate methods
when data from multiple dimensions in concatenated into a single
vector for something like a least squares fit method. A search on
google for "ODE fitting scipy" immediately shows tutorials and other
resources for doing such things.

-Rob



More information about the SciPy-User mailing list