diff --git a/docs/src/index.md b/docs/src/index.md index bee7c65..bde583b 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -8,12 +8,13 @@ Documentation for [SimulatedAnnealingABC](/~https://github.com/Eawag-SIAM/Simulate This package provides different SimulatedAnnealingABC (SABC) algorithms for Approximate Bayesian Computation (ABC) (sometimes also called -_simulation-based inference_ or _likelihood-free inference_"). +_simulation-based inference_ or _likelihood-free inference_). -> [!NOTE] -> If you are able to compute the density of your posterior, you should -most likely not be using this or another ABC package. A traditional MCMC -algorithm will be much more efficient. +!!! note + + If you are able to compute the density of your posterior, you should + most likely not be using this or another ABC package! A traditional MCMC + algorithm will be much more efficient. @@ -25,17 +26,17 @@ todo... ## API -```@index -``` - ```@docs sabc ``` ```@docs - update_population! +update_population! ``` +```@docs +SABCresult +``` ## Related Julia Packages @@ -45,4 +46,4 @@ todo Albert, C., Künsch, H.R., Scheidegger, A., 2015. A simulated annealing approach to approximate Bayes computations. Statistics and computing -25, 1217–1232. https://doi.org/10.1007/s11222-014-9507-8 +25, 1217–1232. [https://doi.org/10.1007/s11222-014-9507-8](https://doi.org/10.1007/s11222-014-9507-8) diff --git a/src/SimulatedAnnealingABC.jl b/src/SimulatedAnnealingABC.jl index ee7a850..0f60ff4 100644 --- a/src/SimulatedAnnealingABC.jl +++ b/src/SimulatedAnnealingABC.jl @@ -42,11 +42,13 @@ mutable struct SABCstate end """ -Holds results +Holds results from a SABC run with fields: - `population`: vector of parameter samples from the approximate posterior - `u`: transformed distances - `ρ`: distances - `state`: state of algorithm + +The history of ϵ can be accessed with the field `state.ϵ_history`. """ struct SABCresult{T, S} population::Vector{T} @@ -265,7 +267,6 @@ Modifies `population_state`. See docstring for `sabc` """ - function update_population!(population_state::SABCresult, f_dist, prior, args...; n_simulation, v=1.0, β=0.8, δ=0.1, @@ -433,9 +434,7 @@ sabc(f_dist::Function, prior::Distribution, args...; - `v = 1.0`: Tuning parameter for XXX - `β = 0.8`: Tuning parameter for XXX - `δ = 0.1`: Tuning parameter for XXX -- `type` = `:single` -> single-ϵ - = `:multi` -> multi-ϵ - = `:hybrid` -> hybrid multi-u-single-ϵ +- `type = :single`: Choose algorithm, either `:single` ,`:multi`, or `:hybrid` - `resample`: After how many accepted population updates? - `checkpoint_history = 1`: every how many population updates distances and epsilons are stored - `show_progressbar::Bool = !is_logging(stderr)`: defaults to `true` for interactive use.