GithubHelp home page GithubHelp logo

deeepeshthakur / diffeqbenchmarks.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sciml/scimlbenchmarks.jl

1.0 1.0 0.0 64.43 MB

Benchmarks for the DiffEq Solvers

License: MIT License

Jupyter Notebook 100.00% TeX 0.01% Julia 0.01%

diffeqbenchmarks.jl's Introduction

DiffEqBenchmarks.jl

Join the chat at https://gitter.im/JuliaDiffEq/Lobby

DiffEqBenchmarks.jl holds Jupyter notebooks showing the benchmarks for the JuliaDiffEq ecosystem.

Viewing the Notebooks Locally

To view the notebooks locally and interact with the contents, use the following commands (requires IJulia):

using Pkg
#Pkg.add("IJulia") # Need to do this the first time to install IJulia!
pkg"add https://github.com/JuliaDiffEq/DiffEqBenchmarks.jl"
using IJulia, DiffEqBenchmarks
notebook(dir = joinpath(dirname(pathof(DiffEqBenchmarks)),".."))

Table of Contents

The notebooks can be viewed remotely on Github or via nbviewer

The following tests were developed for the paper Adaptive Methods for Stochastic Differential Equations via Natural Embeddings and Rejection Sampling with Memory. These notebooks track their latest developments.

Current Summary

The following is a quick summary of the benchmarks. These paint broad strokes over the set of tested equations and some specific examples may differ.

Non-Stiff ODEs

  • OrdinaryDiffEq.jl's methods are the most efficient by a good amount
  • The Vern methods tend to do the best in every benchmark of this category
  • At lower tolerances, Tsit5 does well consistently.
  • ARKODE and Hairer's dopri5/dop853 perform very similarly, but are both far less efficient than the Vern methods.
  • The multistep methods, CVODE_Adams and lsoda, tend to not do very well.
  • The ODEInterface multistep method ddeabm does not do as well as the other multistep methods.
  • ODE.jl's methods are not able to consistently solve the problems.
  • Fixed time step methods are less efficient than the adaptive methods.

Stiff ODEs

  • In this category, the best methods are much more problem dependent.
  • For smaller problems:
    • Rosenbrock23, lsoda, and TRBDF2 tend to be the most efficient at high
      tolerances.
    • Rodas4 and Rodas5 tend to be the most efficient at low tolerances.
  • For larger problems (Filament PDE):
    • CVODE_BDF does the best at all tolerances.
    • The ESDIRK methods like TRBDF2 and KenCarp4 can come close.
  • radau is always the most efficient when tolerances go to the low extreme (1e-13)
  • Fixed time step methods tend to diverge on every tested problem because the high stiffness results in divergence of the Newton solvers.
  • ARKODE is very inconsistent and requires a lot of tweaking in order to not diverge on many of the tested problems. When it doesn't diverge, the similar algorithms in OrdinaryDiffEq.jl (KenCarp4) are much more efficient in most cases.
  • ODE.jl and GeometricIntegrators.jl fail to converge on any of the tested problems.

Dynamical ODEs

  • Higher order (generally order >=6) symplectic integrators are much more efficient than the lower order counterparts.
  • For high accuracy, using a symplectic integrator is not preferred. Their extra cost is not necessary since the other integrators are able to not drift simply due to having low enough error.
  • In this class, the DPRKN methods are by far the most efficient. The Vern methods do well for not being specific to the domain.

Non-Stiff SDEs

  • For simple 1-dimensional SDEs at low accuracy, the EM and RKMil methods can do well. Beyond that, they are simply outclassed.
  • The SRA and SRI methods both are very similar within-class on the simple SDEs.
  • SRA3 is the most efficient when applicable and the tolerances are low.
  • Generally, only low accuracy is necessary to get to sampling error of the mean.
  • The adaptive method is very conservative with error estimates.

Stiff SDEs

  • The high order adaptive methods (SRIW1) generally do well on stiff problems.
  • The "standard" low-order implicit methods, ImplicitEM and ImplicitRK, do not do well on all stiff problems. Some exceptions apply to well-behaved problems like the Stochastic Heat Equation.

Non-Stiff DDEs

  • The efficiency ranking tends to match the ODE Tests, but the cutoff from low to high tolerance is lower.
  • Tsit5 does well in a large class of problems here.
  • The Vern methods do well in low tolerance cases.

Stiff DDEs

  • The Rosenbrock methods, specifically Rodas5, perform well.

Parameter Estimation

  • Broadly two different approaches have been used, Bayesian Inference and Optimisation algorithms.
  • In general it seems that the optimisation algorithms perform more accurately but that can be attributed to the larger number of data points being used in the optimisation cases, Bayesian approach tends to be slower of the two and hence lesser data points are used, accuracy can increase if proper data is used.
  • Within the different available optimisation algorithms, BBO from the BlackBoxOptim package and GN_CRS2_LM for the global case while LD_SLSQP,LN_BOBYQA and LN_NELDERMEAD for the local case from the NLopt package perform the best.
  • Another algorithm being used is the QuadDIRECT algorithm, it gives very good results in the shorter problem case but doesn't do very well in the case of the longer problems.
  • The choice of global versus local optimization make a huge difference in the timings. BBO tends to find the correct solution for a global optimization setup. For local optimization, most methods in NLopt, like :LN_BOBYQA, solve the problem very fast but require a good initial condition.
  • The different backends options available for Bayesian method offer some tradeoffs beteween time, accuracy and control. It is observed that sufficiently high accuracy can be observed with any of the backends with the fine tuning of stepsize, constraints on the parameters, tightness of the priors and number of iterations being passed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.