Skip to content

Commit

Permalink
Fix more links
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Oct 11, 2024
1 parent 137c277 commit 03ef9bb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
24 changes: 12 additions & 12 deletions tutorials/docs-12-using-turing-guide/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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}
Expand All @@ -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.
Expand Down

0 comments on commit 03ef9bb

Please sign in to comment.