Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TransformVariables = "84d833dd-6860-57f9-a1a7-6da5db126cff"
Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"

[compat]
BenchmarkTools = "1"
Expand All @@ -28,3 +29,4 @@ StanSample = "7"
StatsBase = "0.33, 0.34"
StatsPlots = "0.15"
TransformVariables = "0.8"
Turing = "0.38, 0.39, 0.40"
7 changes: 1 addition & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ makedocs(
clean = true,
doctest = false,
modules = [DiffEqBayes],
strict = [
:doctest,
:linkcheck,
:parse_error,
:example_block, # Other available options are # :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block, :footnote, :meta_block, :missing_docs, :setup_block
],
warnonly = true,
format = Documenter.HTML(
assets = ["assets/favicon.ico"],
canonical = "https://docs.sciml.ai/DiffEqBayes/stable/"
Expand Down
10 changes: 6 additions & 4 deletions docs/src/assets/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CmdStan = "593b3428-ca2f-500c-ae53-031589ec8ddd"
DiffEqBayes = "ebbdde9d-f333-5424-9be2-dbf1e9acfb5e"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Expand All @@ -9,22 +8,25 @@ OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
ParameterizedFunctions = "65888b18-ceab-5e60-b2b9-181511a3b968"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
StanSample = "c1514b29-d3a0-5178-b312-660c88baa699"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TransformVariables = "84d833dd-6860-57f9-a1a7-6da5db126cff"
Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"

[compat]
BenchmarkTools = "1"
CmdStan = "6"
DiffEqBayes = "3"
Distributions = "0.25"
Documenter = "0.27"
Documenter = "1"
DynamicHMC = "3"
OrdinaryDiffEq = "6"
ParameterizedFunctions = "5"
Plots = "1"
RecursiveArrayTools = "2, 3"
RecursiveArrayTools = "3"
StanSample = "7"
StatsBase = "0.33, 0.34"
StatsPlots = "0.15"
TransformVariables = "0.8"
Turing = "0.38, 0.39, 0.40"
2 changes: 1 addition & 1 deletion docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ data = convert(Array, randomized)
### Stan

```@example all
using CmdStan #required for using the Stan backend
using StanSample #required for using the Stan backend
bayesian_result_stan = stan_inference(prob1, :rk45, t, data, priors)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/pendulum.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pendulum.

```@example pendulum
using DiffEqBayes, OrdinaryDiffEq, RecursiveArrayTools, Distributions, Plots, StatsPlots,
BenchmarkTools, TransformVariables, CmdStan, DynamicHMC
BenchmarkTools, TransformVariables, StanSample, DynamicHMC
```

Let's define our simple pendulum problem. Here, our pendulum has a drag term `ω`
Expand Down
8 changes: 5 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This repository is a set of extension functionality for estimating the parameters
of differential equations using Bayesian methods. It allows the choice of using
[CmdStan.jl](https://stanjulia.github.io/CmdStan.jl/stable/), [Turing.jl](https://turing.ml/stable/docs/using-turing/), [DynamicHMC.jl](https://www.tamaspapp.eu/DynamicHMC.jl/stable/) and
[StanSample.jl](https://stanjulia.github.io/StanSample.jl/stable/), [Turing.jl](https://turing.ml/stable/docs/using-turing/), [DynamicHMC.jl](https://www.tamaspapp.eu/DynamicHMC.jl/stable/) and
[ApproxBayes.jl](https://github.com/marcjwilliams1/ApproxBayes.jl) to perform a
Bayesian estimation of a differential equation problem specified via the [DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/) interface.

Expand Down Expand Up @@ -78,11 +78,12 @@ You can also download the
```

```@eval
using TOML
using TOML, Markdown
version = TOML.parse(read("../../Project.toml", String))["version"]
name = TOML.parse(read("../../Project.toml", String))["name"]
link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
"/assets/Manifest.toml"
Markdown.parse(link)
```

```@raw html
Expand All @@ -91,11 +92,12 @@ link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
```

```@eval
using TOML
using TOML, Markdown
version = TOML.parse(read("../../Project.toml", String))["version"]
name = TOML.parse(read("../../Project.toml", String))["name"]
link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
"/assets/Project.toml"
Markdown.parse(link)
```

```@raw html
Expand Down
6 changes: 3 additions & 3 deletions docs/src/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ stan_inference(prob::DiffEqBase.DEProblem, alg, t, data, priors = nothing;
output_format = :mcmcchains, print_summary = true, tmpdir = mktempdir())
```

`stan_inference` uses [Stan.jl](https://stanjulia.github.io/CmdStan.jl/latest/INTRO/)
`stan_inference` uses [StanSample.jl](https://stanjulia.github.io/StanSample.jl/stable/)
to perform the Bayesian inference. The
[Stan installation process](https://stanjulia.github.io/CmdStan.jl/latest/INSTALLATION/)
[Stan installation process](https://stanjulia.github.io/StanSample.jl/stable/INSTALLATION/)
is required to use this function. Currently `CmdStan v2.34.1` is supported.

`prob` can be any `DEProblem` with a corresponding `alg` choice. `alg` is a choice between `:rk45` and `:bdf`, the two internal integrators of Stan. `t` is the array of time and `data` is the array where the first dimension (columns) corresponds to the array of system values. `priors` is an array of prior distributions for each parameter, specified via a [Distributions.jl](https://juliastats.github.io/Distributions.jl/dev/) type. `likelihood` is the likelihood distribution to use with the arguments from `vars`, and `vars` is a tuple of priors for the distributions of the likelihood hyperparameters. The special value `StanODEData()` in this tuple denotes the position that the ODE solution takes in the likelihood's parameter list.
Expand All @@ -45,7 +45,7 @@ type.

The `turing_inference` interacts with `SciML.CommonSolve.solve` and `StatsBase.sample`. Both accept many arguments depending on the solver and sampling algorithm.
These arguments are supplied to `turing_inferene` function via `solve_kwargs`, `sample_args`, and `sample_kwargs` arguments. Please refer to [the `solve` documentation](https://docs.sciml.ai/DiffEqDocs/stable/basics/common_solver_opts/) for `solve_kwargs`, e.g. `solve_kwargs = Dict(:save_idxs => [1])`.
The `solve` keyword arguments default to `save_idxs = nothing`. Similarly please refer to [the `sample` documentation]((https://turinglang.org/v0.26/docs/using-turing/guide#sampling-multiple-chains)) for `sample_args` and `sample_kwargs`. The four positional argument are as following: `sampler`, the sampling algorithm. Sampling from multiple chains is possible serially or parallelly using `parallel_type`. Third `num_samples`, the number of samples per MCMC chain and `n_chains`, the number of MCMC chains. The positional arguments default to the following values.
The `solve` keyword arguments default to `save_idxs = nothing`. Similarly please refer to [the `sample` documentation](https://turinglang.org/v0.26/docs/using-turing/guide#sampling-multiple-chains) for `sample_args` and `sample_kwargs`. The four positional argument are as following: `sampler`, the sampling algorithm. Sampling from multiple chains is possible serially or parallelly using `parallel_type`. Third `num_samples`, the number of samples per MCMC chain and `n_chains`, the number of MCMC chains. The positional arguments default to the following values.

```julia
sampler = Turing.NUTS(0.65)
Expand Down
Loading