Skip to content

Commit 86ab4e5

Browse files
JaimeRZPyebaicgbottagithub-actions[bot]torfjelde
authoredOct 20, 2023
External samplers docs (#428)
* Add all high level docs from Turing.jl * Fix some permalinks. * Converted Quickstart doc * Converted contributing pages to jmd * add project files * Disable evaluating style examples * Update and rename index.md to index.jmd * Rename index.jmd to using-turing.jmd * fix formatting for guide.md * Fixed formatting. * Update tutorials/for-developers-interface/interface.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update tutorials/for-developers-abstractmcmc-turing/how_turing_implements_abstractmcmc.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update tutorials/for-developers-abstractmcmc-turing/how_turing_implements_abstractmcmc.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * update sample viz * add dummy julia code block to enable jmd building * Bugfix for negative variance. * More conversions * Added dependencies and changed directory names * Fixed dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * Fixing dependencies * other tutorials * other tutorials * other tutorials * fix merge conflict with master * some edits to advanced * remove weave from deps * improve compiler * added julia formatting for a block which it was missing (#398) Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com> * AbstractMCMC fixes, rename some files, and update manifests (#399) * abstract-mcmc * Rename files * no empty cell + hyperlink to bishop (#400) * add numeric prefix to docs * triger rebuild * add Distributions to deps * minor fixes * Minor edits * Update tutorials/docs-12-using-turing-guide/using-turing-guide.jmd Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update tutorials/docs-09-using-turing-advanced/advanced.jmd Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs draft * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * upd branch * env * format * better name * undoing rename * undoing fck up * working on Pathfinder example * Apply suggestions from code review Co-authored-by: Tor Erlend Fjelde <tor.erlend95@gmail.com> * citations * no propaganda * flesing out the examples * format * more concise * format * advancedMH * for devs * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update tutorials/15-external-samplers/external-samplers.jmd Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * bug * Apply suggestions from code review Co-authored-by: Tor Erlend Fjelde <tor.erlend95@gmail.com> * upd * Update tutorials/15-external-samplers/external-samplers.jmd Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update tutorials/15-external-samplers/external-samplers.jmd Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update external-samplers.jmd * update manifest.toml * Update external-samplers.jmd * update manifest file * bug * upd deps * Revert "upd deps" This reverts commit 32284d5. * bump manifesto * nearly there * bump turing * slight formatting error * folder name conv * folder name conv * rm old files * hyperlinks in html * Update tutorials/docs-16-using-turing-external-samplers/external-samplers.jmd Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update external-samplers.jmd --------- Co-authored-by: Hong Ge <hg344@cam.ac.uk> Co-authored-by: Colton Botta <39240537+cgbotta@users.noreply.github.com> Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tor Erlend Fjelde <tor.erlend95@gmail.com> Co-authored-by: Will Tebbutt <wt0881@my.bristol.ac.uk>
1 parent aa511e8 commit 86ab4e5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
 

‎tutorials/docs-16-using-turing-external-samplers/external-samplers.jmd

+9-9
Original file line numberDiff line numberDiff line change
@@ -151,19 +151,19 @@ There are several characteristics to note in these functions:
151151
- The functions must follow the displayed signatures.
152152
- The output of the functions must be a transition, the current state of the sampler, and a sample, what is saved to the MCMC chain.
153153

154-
The last requirement is that the transition must be structured with a field `θ` which contains the values of the parameters of the model for said transition.
154+
The last requirement is that the transition must be structured with a field `θ`, which contains the values of the parameters of the model for said transition.
155155
This allows `Turing` to seamlessly extract the parameter values at each step of the chain when bundling the chains.
156-
Note that if the external sampler produces transitions that Turing cannot parse the bundling of the samples will be different or fail.
156+
Note that if the external sampler produces transitions that Turing cannot parse, the bundling of the samples will be different or fail.
157157

158158
For practical examples of how to adapt a sampling library to the `AbstractMCMC` interface, the readers can consult the following libraries:
159159

160-
- (AdvancedMH)[https://github.com/TuringLang/AdvancedMH.jl/blob/458a602ac32a8514a117d4c671396a9ba8acbdab/src/mh-core.jl#L73-L115]
161-
- (AdvancedHMC)[https://github.com/TuringLang/AdvancedHMC.jl/blob/762e55f894d142495a41a6eba0eed9201da0a600/src/abstractmcmc.jl#L102-L170]
162-
- (MicroCanonicalHMC)[https://github.com/JaimeRZP/MicroCanonicalHMC.jl/blob/master/src/abstractmcmc.jl] within `MicroCanonicalHMC`.
160+
- [AdvancedMH](https://github.com/TuringLang/AdvancedMH.jl/blob/458a602ac32a8514a117d4c671396a9ba8acbdab/src/mh-core.jl#L73-L115)
161+
- [AdvancedHMC](https://github.com/TuringLang/AdvancedHMC.jl/blob/762e55f894d142495a41a6eba0eed9201da0a600/src/abstractmcmc.jl#L102-L170)
162+
- [MicroCanonicalHMC](https://github.com/JaimeRZP/MicroCanonicalHMC.jl/blob/master/src/abstractmcmc.jl)
163163

164164
# Refences
165165

166-
[^1]: Xu et al, (AdvancedHMC.jl: A robust, modular and efficient implementation of advanced HMC algorithms)[http://proceedings.mlr.press/v118/xu20a/xu20a.pdf], 2019
167-
[^2]: Zhang et al, (Pathfinder: Parallel quasi-Newton variational inference)[https://arxiv.org/abs/2108.03782], 2021
168-
[^3]: Robnik et al, (Microcanonical Hamiltonian Monte Carlo)[https://arxiv.org/abs/2212.08549], 2022
169-
[^4]: Robnik and Seljak, (Langevine Hamiltonian Monte Carlo)[https://arxiv.org/abs/2303.18221], 2023
166+
[^1]: Xu et al., [AdvancedHMC.jl: A robust, modular and efficient implementation of advanced HMC algorithms](http://proceedings.mlr.press/v118/xu20a/xu20a.pdf), 2019
167+
[^2]: Zhang et al., [Pathfinder: Parallel quasi-Newton variational inference](https://arxiv.org/abs/2108.03782), 2021
168+
[^3]: Robnik et al, [Microcanonical Hamiltonian Monte Carlo](https://arxiv.org/abs/2212.08549), 2022
169+
[^4]: Robnik and Seljak, [Langevine Hamiltonian Monte Carlo](https://arxiv.org/abs/2303.18221), 2023

0 commit comments

Comments
 (0)
Please sign in to comment.