Skip to content

Commit

Permalink
Format Markdown too
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Oct 2, 2024
1 parent 8832099 commit 8c368c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import_to_using = false
# We ignore these files because when formatting was first put in place they were being worked on.
# These ignores should be removed once the relevant PRs are merged/closed.
ignore = [
# Upstream issue
"docs/src/api.md",
# https://github.com/TuringLang/Turing.jl/pull/2231/files
"src/experimental/gibbs.jl",
"src/mcmc/abstractmcmc.jl",
Expand Down
30 changes: 15 additions & 15 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# API

## Module-wide re-exports

Turing.jl directly re-exports the entire public API of the following packages:

- [Distributions.jl](https://juliastats.org/Distributions.jl)
- [MCMCChains.jl](https://turinglang.org/MCMCChains.jl)
- [AbstractMCMC.jl](https://turinglang.org/AbstractMCMC.jl)
- [Bijectors.jl](https://turinglang.org/Bijectors.jl)
- [Libtask.jl](https://github.com/TuringLang/Libtask.jl)
- [Distributions.jl](https://juliastats.org/Distributions.jl)
- [MCMCChains.jl](https://turinglang.org/MCMCChains.jl)
- [AbstractMCMC.jl](https://turinglang.org/AbstractMCMC.jl)
- [Bijectors.jl](https://turinglang.org/Bijectors.jl)
- [Libtask.jl](https://github.com/TuringLang/Libtask.jl)

Please see the individual packages for their documentation.

Expand All @@ -19,7 +20,7 @@ That means, for example, you can just write
```julia
using Turing

@model function my_model(...)
@model function my_model() end

sample(my_model(), Prior(), 100)
```
Expand All @@ -35,21 +36,21 @@ even though [`Prior()`](@ref) is actually defined in the `Turing.Inference` modu
### Modelling

| Exported symbol | Documentation | Description |
| --- | --- | --- |
|:--------------- |:--------------------------------- |:-------------------------------------------- |
| `@model` | [`DynamicPPL.@model`](@extref) | Define a probabilistic model |
| `@varname` | [`AbstractPPL.@varname`](@extref) | Generate a `VarName` from a Julia expression |
| `@submodel` | [`DynamicPPL.@submodel`](@extref) | Define a submodel |

### Inference

| Exported symbol | Documentation | Description |
| --- | --- | --- |
|:--------------- |:------------------------------------------------------------------------------------------------ |:------------------- |
| `sample` | [`StatsBase.sample`](https://turinglang.org/AbstractMCMC.jl/stable/api/#Sampling-a-single-chain) | Sample from a model |

### Samplers

| Exported symbol | Documentation | Description |
| --- | --- | --- |
|:-------------------- |:--------------------------------------------- |:------------------------------------------------------------------- |
| `Prior` | [`Turing.Inference.Prior`](@ref) | Sample from the prior distribution |
| `MH` | [`Turing.Inference.MH`](@ref) | Metropolis–Hastings |
| `Emcee` | [`Turing.Inference.Emcee`](@ref) | Affine-invariant ensemble sampler |
Expand All @@ -76,7 +77,7 @@ Please see the [variational inference tutorial](https://turinglang.org/docs/tuto
TODO: Generate docs for AdvancedVI 0.2, update the InterLinks object.inv, and update the table below to include `@extref`.

| Exported symbol | Documentation | Description |
| --- | --- | --- |
|:--------------- |:----------------- |:--------------------------------------- |
| `vi` | `AdvancedVI.vi` | Perform variational inference |
| `ADVI` | `AdvancedVI.ADVI` | Construct an instance of a VI algorithm |

Expand All @@ -85,7 +86,7 @@ TODO: Generate docs for AdvancedVI 0.2, update the InterLinks object.inv, and up
These are used to specify the automatic differentiation backend to use.

| Exported symbol | Documentation | Description |
| --- | --- | --- |
|:----------------- |:------------------------------------ |:----------------------------------------- |
| `AutoForwardDiff` | [`ADTypes.AutoForwardDiff`](@extref) | ForwardDiff.jl backend |
| `AutoReverseDiff` | [`ADTypes.AutoReverseDiff`](@extref) | ReverseDiff.jl backend |
| `AutoZygote` | [`ADTypes.AutoZygote`](@extref) | Zygote.jl backend |
Expand Down Expand Up @@ -122,7 +123,7 @@ Distributions.BernoulliLogit
TODO: DistributionsAD needs docs

| Exported symbol | Documentation | Description |
| --- | --- | --- |
|:--------------- |:--------------------------------- |:-------------------------------------------------------------- |
| `filldist` | `DistributionsAD.filldist` | Create a product distribution from a distribution and integers |
| `arraydist` | `DistributionsAD.arraydist` | Create a product distribution from an array of distributions |
| `NamedDist` | [`DynamicPPL.NamedDist`](@extref) | A distribution that carries the name of the variable |
Expand All @@ -136,7 +137,7 @@ predict
### Re-exports from DynamicPPL / AbstractPPL

| Exported symbol | Documentation | Description |
| --- | --- | --- |
|:-------------------------- |:--------------------------------------------------------------------------------------------------------------------------------- |:--------------------------------------------------------------- |
| `pointwise_loglikelihoods` | [`DynamicPPL.pointwise_loglikelihoods`](@extref) | Compute log likelihoods for each sample in a chain |
| `generated_quantities` | [`DynamicPPL.generated_quantities`](@extref) | Calculate additional quantities defined in a model |
| `logprior` | [`DynamicPPL.logprior`](@extref) | Compute log prior probability |
Expand All @@ -160,9 +161,8 @@ Bijectors.ordered
### Point estimates

| Exported symbol | Documentation | Description |
| --- | --- | --- |
|:---------------------- |:-------------------------------------------------- |:-------------------------------------------- |
| `maximum_a_posteriori` | [`Turing.Optimisation.maximum_a_posteriori`](@ref) | Find a MAP estimate for a model |
| `maximum_likelihood` | [`Turing.Optimisation.maximum_likelihood`](@ref) | Find a MLE estimate for a model |
| `MAP` | [`Turing.Optimisation.MAP`](@ref) | Type to use with Optim.jl for MAP estimation |
| `MLE` | [`Turing.Optimisation.MLE`](@ref) | Type to use with Optim.jl for MLE estimation |

0 comments on commit 8c368c5

Please sign in to comment.