Skip to content

Commit

Permalink
Merge branch 'main' into compathelper/new_version/2023-05-15-01-21-20…
Browse files Browse the repository at this point in the history
…-644-00122993255
  • Loading branch information
nathanaelbosch authored Oct 3, 2023
2 parents 0d5f847 + 7e471e8 commit 351d25d
Show file tree
Hide file tree
Showing 31 changed files with 657 additions and 104 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
matrix:
version:
- '1.6'
- '1.8'
- '1'
- 'nightly'
os:
- ubuntu-latest
arch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
julia-version: [1,1.6]
julia-version: [1]
os: [ubuntu-latest]
package:
- {user: nathanaelbosch, repo: Fenrir.jl, group: All}
Expand Down
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name = "ProbNumDiffEq"
uuid = "bf3e78b0-7d74-48a5-b855-9609533b56a5"
authors = ["Nathanael Bosch"]
version = "0.11.1"
version = "0.12.1"

[deps]
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d"
ExponentialUtilities = "d4d017d3-3776-5f7e-afef-a10c40355c18"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
FunctionWrappersWrappers = "77dc65aa-8811-40c2-897b-53d922fa7daf"
GaussianDistributions = "43dcc890-d446-5863-8d1a-14597580bb8d"
Expand All @@ -34,11 +35,12 @@ DiffEqBase = "6.122"
DiffEqDevTools = "2"
ExponentialUtilities = "1"
FastBroadcast = "0.2"
FastGaussQuadrature = "0.5"
ForwardDiff = "0.10"
FunctionWrappersWrappers = "0.1.3"
GaussianDistributions = "0.5"
Octavian = "0.3.17"
OrdinaryDiffEq = "6.49.1"
OrdinaryDiffEq = "6.52"
PSDMatrices = "0.4.2"
PrecompileTools = "1"
RecipesBase = "1"
Expand Down
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[deps]
Bibliography = "f1be7e48-bf82-45af-a471-ae754a193061"
DiffEqUncertainty = "ef61062a-5684-51dc-bb67-a0fcdec5c97d"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
Fenrir = "e9b4b195-f5cd-427c-8076-5358c553c37f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
Expand Down
42 changes: 35 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,23 +1,50 @@
using Documenter
using ProbNumDiffEq

using DocumenterCitations, Bibliography

# DocumenterCitations.bib_sorting(::Val{:numeric}) = :nyt
# function DocumenterCitations.format_bibliography_label(
# ::Val{:numeric},
# entry,
# citations::DocumenterCitations.OrderedDict{String,Int64},
# )
# key = entry.id
# sorted_bibtex_keys = citations |> keys |> collect |> sort
# i = findfirst(x -> x == key, sorted_bibtex_keys)
# @info "format_bibliography_label" entry.id citations sorted_bibtex_keys i entry.date
# return "[$i]"
# end
# Bibliography.sorting_rules[:nyt] = [:authors; :date; :title]

bib = CitationBibliography(
joinpath(@__DIR__, "src", "refs.bib"),
style=:numeric,
# style=:authoryear,
)
sort_bibliography!(bib.entries, :nyt) # name-year-title

makedocs(
bib,
sitename="ProbNumDiffEq.jl",
format=Documenter.HTML(),
format=Documenter.HTML(
assets=String["assets/citations.css"],
),
modules=[ProbNumDiffEq],
pages=[
"Home" => "index.md",
"Tutorials" => [
"Getting Started" => "getting_started.md"
"Second Order ODEs and Energy Preservation" => "dynamical_odes.md"
"Differential Algebraic Equations" => "dae.md"
"Parameter Inference" => "fenrir.md"
"Getting Started" => "tutorials/getting_started.md"
"Second Order ODEs and Energy Preservation" => "tutorials/dynamical_odes.md"
"Differential Algebraic Equations" => "tutorials/dae.md"
"Probabilistic Exponential Integrators" => "tutorials/exponential_integrators.md"
"Parameter Inference" => "tutorials/fenrir.md"
],
"Solvers and Options" => [
"solvers.md",
"diffusions.md",
"initialization.md",
"priors.md",
"initialization.md",
"diffusions.md",
],
"Benchmarks" => [
"Multi-Language Wrapper Benchmark" => "benchmarks/multi-language-wrappers.md",
Expand All @@ -29,6 +56,7 @@ makedocs(
"Filtering and Smoothing" => "filtering.md"
"Implementation via OrdinaryDiffEq.jl" => "implementation.md"
],
"References" => "references.md",
],
)

Expand Down
17 changes: 17 additions & 0 deletions docs/src/assets/citations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.citation dl {
display: grid;
grid-template-columns: max-content auto; }
.citation dt {
grid-column-start: 1; }
.citation dd {
grid-column-start: 2;
margin-bottom: 0.75em; }
.citation ul {
padding: 0 0 2.25em 0;
margin: 0;
list-style: none;}
.citation ul li {
text-indent: -2.25em;
margin: 0.33em 0.5em 0.5em 2.25em;}
.citation ol li {
padding-left:0.75em;}
9 changes: 7 additions & 2 deletions docs/src/diffusions.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Or more compactly:
| Time-fixed | [`FixedDiffusion`](@ref) | [`FixedMVDiffusion`](@ref) |


For more details on diffusions and calibration, check out this paper [[1]](@ref diffusionrefs).
For more details on diffusions and calibration, check out this paper [bosch20capos](@cite).


## API
Expand All @@ -59,4 +59,9 @@ FixedMVDiffusion

## [References](@id diffusionrefs)

[1] N. Bosch, P. Hennig, F. Tronarp: **Calibrated Adaptive Probabilistic ODE Solvers** (2021) ([link](http://proceedings.mlr.press/v130/bosch21a.html))
```@bibliography
Pages = []
Canonical = false
bosch20capos
```
53 changes: 20 additions & 33 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,13 @@ The implemented _ODE filters_ solve differential equations via Bayesian filterin

For a short intro video, check out our [poster presentation at JuliaCon2021](https://www.youtube.com/watch?v=EMFl6ytP3iQ).

---

__For more probabilistic numerics check out the [ProbNum](https://probnum.readthedocs.io/en/latest/) 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.8) pkg> add ProbNumDiffEq
(v1.9) pkg> add ProbNumDiffEq
```

## Getting Started
Expand All @@ -30,28 +23,22 @@ For a quick introduction check out the "[Solving ODEs with Probabilistic Numeric

## Features

- Two extended Kalman filtering-based probabilistic solvers: the explicit [`EK0`](@ref) and semi-implicit [`EK1`](@ref).
- Adaptive step-size selection (by default with PI control)
- On-line uncertainty calibration, for multiple different measurement models
- Dense output
- Sampling from the solution
- Callback support
- Convenient plotting through a Plots.jl recipe
- Automatic differentiation via ForwardDiff.jl
- Supports arbitrary precision numbers via BigFloats.jl
- Specialized solvers for second-order ODEs (demo will be added)
- Compatible with DAEs in mass-matrix ODE form (demo will be added)


## [References](@id references)

- N. Bosch, F. Tronarp, P. Hennig: **Pick-and-Mix Information Operators for Probabilistic ODE Solvers** (2022)
- N. Krämer, N. Bosch, J. Schmidt, P. Hennig: **Probabilistic ODE Solutions in Millions of Dimensions** (2021)
- N. Bosch, P. Hennig, F. Tronarp: **Calibrated Adaptive Probabilistic ODE Solvers** (2021)
- F. Tronarp, S. Särkkä, and P. Hennig: **Bayesian ODE Solvers: The Maximum A Posteriori Estimate** (2021)
- N. Krämer, P. Hennig: **Stable Implementation of Probabilistic ODE Solvers** (2020)
- H. Kersting, T. J. Sullivan, and P. Hennig: **Convergence Rates of Gaussian Ode Filters** (2020)
- 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)
- M. Schober, S. Särkkä, and P. Hennig: **A Probabilistic Model for the Numerical Solution of Initial Value Problems** (2018)

A much more detailed list of references, not only on ODE filters but on probabilistic numerics in general, can be found on the [probabilistic-numerics.org homepage](https://www.probabilistic-numerics.org/research/general/).
- Two extended Kalman filtering-based probabilistic solvers: the explicit [`EK0`](@ref) and semi-implicit [`EK1`](@ref).
- Adaptive step-size selection with PI control;
fully compatible with [DifferentialEquations.jl's timestepping options](https://docs.sciml.ai/DiffEqDocs/stable/extras/timestepping/)
- Online uncertainty calibration for multiple different diffusion models (see "[Diffusion models and calibration](@ref)")
- [Dense output](@ref)
- Sampling from the solution
- Callback support
- Convenient plotting through a [Plots.jl](https://docs.juliaplots.org/latest/) recipe
- Automatic differentiation via [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl)
- Arbitrary precision via Julia's built-in [arbitrary precision arithmetic](https://docs.julialang.org/en/v1/manual/integers-and-floating-point-numbers/#Arbitrary-Precision-Arithmetic)
- Specialized solvers for second-order ODEs (see [Second Order ODEs and Energy Preservation](@ref))
- Compatible with DAEs in mass-matrix ODE form (see [Solving DAEs with Probabilistic Numerics](@ref))


## Related packages

- [probdiffeq](https://pnkraemer.github.io/probdiffeq/): Fast and feature-rich filtering-based probabilistic ODE solvers in JAX.
- [ProbNum](https://probnum.readthedocs.io/en/latest/): Probabilistic numerics in Python. It has not only probabilistic ODE solvers, but also probabilistic linear solvers, Bayesian quadrature, and many filtering and smoothing implementations.
- [Fenrir.jl](https://github.com/nathanaelbosch/Fenrir.jl): Parameter-inference in ODEs with probabilistic ODE solvers. This package builds on ProbNumDiffEq.jl to provide a negative marginal log-likelihood function, which can then be used with an optimizer or with MCMC for parameter inference.
14 changes: 10 additions & 4 deletions docs/src/initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ Y^{(0)}(0) &= y_0, \\
Y^{(1)}(0) &= f(y_0, 0).
\end{aligned}
```
And it turns out that we can also compute higher-order derivatives of ``y`` with the chain rule,
which we can use to initialize ``Y^{(i)}(0)``.
It turns out that we can also compute higher-order derivatives of ``y`` with the chain rule,
and then use these to better initialize ``Y^{(i)}(0)``.
This, done efficiently with Taylor-mode autodiff by using
[TaylorIntegration.jl](https://perezhz.github.io/TaylorIntegration.jl/latest/),
is what [`TaylorModeInit`](@ref) does.
Expand All @@ -65,7 +65,13 @@ TaylorModeInit
ClassicSolverInit
```


## [References](@id initrefs)

[1] N. Krämer, P. Hennig: **Stable Implementation of Probabilistic ODE Solvers** (2020) ([link](https://arxiv.org/abs/2012.10106))
[2] M. Schober, S. Särkkä, and P. Hennig: **A Probabilistic Model for the Numerical Solution of Initial Value Problems** (2018) ([link](https://link.springer.com/article/10.1007/s11222-017-9798-7))
```@bibliography
Pages = []
Canonical = false
kraemer20stableimplementation
schober16probivp
```
5 changes: 5 additions & 0 deletions docs/src/references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# [References](@id references)

```@bibliography
*
```
Loading

0 comments on commit 351d25d

Please sign in to comment.