Skip to content

Probabilistic ODE Solvers via Bayesian Filtering and Smoothing

License

Notifications You must be signed in to change notification settings

pnkraemer/ProbNumDiffEq.jl

 
 

Repository files navigation

ProbNumDiffEq.jl

Stable Dev Build Status Coverage Benchmarks

Banner

ProbNumDiffEq.jl provides probabilistic numerical ODE solvers to the DifferentialEquations.jl ecosystem. The implemented ODE filters solve differential equations via Bayesian filtering and smoothing. The filters compute not just a single point estimate of the true solution, but a posterior distribution that contains an estimate of its numerical approximation error.

For a short intro video, check out our poster presentation at JuliaCon2021.


For more probabilistic numerics check out the ProbNum Python package. It implements probabilistic ODE solvers, but also probabilistic linear solvers, Bayesian quadrature, and many filtering and smoothing implementations.


Installation

Run Julia, enter ] to bring up Julia's package manager, and add the ProbNumDiffEq.jl package:

julia> ]
(v1.7) pkg> add ProbNumDiffEq.jl

Example: Solving the FitzHugh-Nagumo ODE

using ProbNumDiffEq

# ODE definition as in DifferentialEquations.jl
function f(du, u, p, t)
    a, b, c = p
    du[1] = c*(u[1] - u[1]^3/3 + u[2])
    du[2] = -(1/c)*(u[1] -  a - b*u[2])
end
u0 = [-1.0, 1.0]
tspan = (0.0, 20.0)
p = (0.2, 0.2, 3.0)
prob = ODEProblem(f, u0, tspan, p)

# Solve the ODE with a probabilistic numerical solver: EK0
sol = solve(prob, EK0(order=1), abstol=1e-2, reltol=1e-1)

# Plot the solution with Plots.jl
using Plots
plot(sol, color=["#107D79" "#FF9933"])

Fitzhugh-Nagumo Solution

Benchmarks

References

The main references for this package include:

  • M. Schober, S. Särkkä, and P. Hennig: A Probabilistic Model for the Numerical Solution of Initial Value Problems (2018) (link)
  • F. Tronarp, H. Kersting, S. Särkkä, and P. Hennig: Probabilistic Solutions To Ordinary Differential Equations As Non-Linear Bayesian Filtering: A New Perspective (2019) (link)
  • N. Krämer, P. Hennig: Stable Implementation of Probabilistic ODE Solvers (2020) (link)
  • N. Bosch, P. Hennig, F. Tronarp: Calibrated Adaptive Probabilistic ODE Solvers (2021) (link)
  • N. Bosch, F. Tronarp, P. Hennig: Pick-and-Mix Information Operators for Probabilistic ODE Solvers (2022) (link)

A more extensive list of references relevant to ODE filters is provided here.

About

Probabilistic ODE Solvers via Bayesian Filtering and Smoothing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 100.0%