From 03ef9bb9c22b23e44d36bb1c06f48688c146e990 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Fri, 11 Oct 2024 19:17:35 +0100 Subject: [PATCH] Fix more links --- _quarto.yml | 10 ++++---- .../docs-12-using-turing-guide/index.qmd | 24 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index 449dbf50b..48cb2bdd5 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -160,11 +160,10 @@ format: execute: freeze: auto -# Global Variables to use in any qmd files using: -# {{< meta site-url >}} - -site-url: https://turinglang.org -doc-base-url: https://turinglang.org/docs +# These variables can be used in any qmd files, e.g. for links: +# the [Getting Started page]({{< meta get-started >}}) +# Note that you don't need to prepend `../../` to the link, Quarto will figure +# it out automatically. get-started: tutorials/docs-00-getting-started tutorials-intro: tutorials/00-introduction @@ -201,3 +200,4 @@ usage-probability-interface: tutorials/usage-probability-interface usage-custom-distribution: tutorials/tutorials/usage-custom-distribution usage-generated-quantities: tutorials/tutorials/usage-generated-quantities usage-modifying-logprob: tutorials/tutorials/usage-modifying-logprob +dev-model-manual: tutorials/dev-model-manual diff --git a/tutorials/docs-12-using-turing-guide/index.qmd b/tutorials/docs-12-using-turing-guide/index.qmd index 2362ee5b5..b6f16ac81 100755 --- a/tutorials/docs-12-using-turing-guide/index.qmd +++ b/tutorials/docs-12-using-turing-guide/index.qmd @@ -54,7 +54,7 @@ setprogress!(false) p1 = sample(gdemo(missing, missing), Prior(), 100000) ``` -We can perform inference by using the `sample` function, the first argument of which is our probabilistic program and the second of which is a sampler. More information on each sampler is located in the [API]({{< meta site-url >}}/library). +We can perform inference by using the `sample` function, the first argument of which is our probabilistic program and the second of which is a sampler. ```{julia} # Run sampler, collect results. @@ -66,6 +66,17 @@ c5 = sample(gdemo(1.5, 2), HMCDA(0.15, 0.65), 1000) c6 = sample(gdemo(1.5, 2), NUTS(0.65), 1000) ``` +The arguments for each sampler are: + + - SMC: number of particles. + - PG: number of particles, number of iterations. + - HMC: leapfrog step size, leapfrog step numbers. + - Gibbs: component sampler 1, component sampler 2, ... + - HMCDA: total leapfrog length, target accept ratio. + - NUTS: number of adaptation steps (optional), target accept ratio. + +More information about each sampler can be found in [Turing.jl's API docs](https://turinglang.org/Turing.jl). + The `MCMCChains` module (which is re-exported by Turing) provides plotting tools for the `Chain` objects returned by a `sample` function. See the [MCMCChains](https://github.com/TuringLang/MCMCChains.jl) repository for more information on the suite of tools available for diagnosing MCMC chains. ```{julia} @@ -78,17 +89,6 @@ plot(c3) savefig("gdemo-plot.png") ``` -The arguments for each sampler are: - - - SMC: number of particles. - - PG: number of particles, number of iterations. - - HMC: leapfrog step size, leapfrog step numbers. - - Gibbs: component sampler 1, component sampler 2, ... - - HMCDA: total leapfrog length, target accept ratio. - - NUTS: number of adaptation steps (optional), target accept ratio. - -For detailed information on the samplers, please review Turing.jl's [API]({{< meta site-url >}}/library) documentation. - ### Modelling Syntax Explained Using this syntax, a probabilistic model is defined in Turing. The model function generated by Turing can then be used to condition the model onto data. Subsequently, the sample function can be used to generate samples from the posterior distribution.