diff --git a/docs/Project.toml b/docs/Project.toml index 663fd8b..e4ee550 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -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" @@ -28,3 +29,4 @@ StanSample = "7" StatsBase = "0.33, 0.34" StatsPlots = "0.15" TransformVariables = "0.8" +Turing = "0.38, 0.39, 0.40" diff --git a/docs/make.jl b/docs/make.jl index 75d2427..064bc9f 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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/" diff --git a/docs/src/assets/Project.toml b/docs/src/assets/Project.toml index 4b1e92a..e4ee550 100644 --- a/docs/src/assets/Project.toml +++ b/docs/src/assets/Project.toml @@ -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" @@ -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" diff --git a/docs/src/examples.md b/docs/src/examples.md index 8d48a6b..6409a45 100644 --- a/docs/src/examples.md +++ b/docs/src/examples.md @@ -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) ``` diff --git a/docs/src/examples/pendulum.md b/docs/src/examples/pendulum.md index 6beb9f6..38332d2 100644 --- a/docs/src/examples/pendulum.md +++ b/docs/src/examples/pendulum.md @@ -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 `ω` diff --git a/docs/src/index.md b/docs/src/index.md index 5d39b2c..18a2629 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -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. @@ -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 @@ -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 diff --git a/docs/src/methods.md b/docs/src/methods.md index b965fad..9e9b310 100644 --- a/docs/src/methods.md +++ b/docs/src/methods.md @@ -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. @@ -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)