Skip to content

Commit 6bf2fa9

Browse files
authored
Fix minor typos in 15-gaussian-processes (#487)
1 parent ca882d6 commit 6bf2fa9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tutorials/15-gaussian-processes/index.qmd

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ Observe it has three columns:
5555
We will use a Binomial model for the data, whose success probability is parametrised by a
5656
transformation of a GP. Something along the lines of:
5757
$$
58-
f \sim \operatorname{GP}(0, k) \\
59-
y_j \mid f(d_j) \sim \operatorname{Binomial}(n_j, g(f(d_j))) \\
60-
g(x) := \frac{1}{1 + e^{-x}}
58+
\begin{aligned}
59+
f & \sim \operatorname{GP}(0, k) \\
60+
y_j \mid f(d_j) & \sim \operatorname{Binomial}(n_j, g(f(d_j))) \\
61+
g(x) & := \frac{1}{1 + e^{-x}}
62+
\end{aligned}
6163
$$
6264

6365
To do this, let's define our Turing.jl model:
@@ -79,10 +81,10 @@ We first define an `AbstractGPs.GP`, which represents a distribution over functi
7981
is entirely separate from Turing.jl.
8082
We place a prior over its variance `v` and length-scale `l`.
8183
`f(d, jitter)` constructs the multivariate Gaussian comprising the random variables
82-
in `f` whose indices are in `d` (+ a bit of independent Gaussian noise with variance
84+
in `f` whose indices are in `d` (plus a bit of independent Gaussian noise with variance
8385
`jitter` -- see [the docs](https://juliagaussianprocesses.github.io/AbstractGPs.jl/dev/api/#FiniteGP-and-AbstractGP)
8486
for more details).
85-
`f(d, jitter) isa AbstractMvNormal`, and is the bit of AbstractGPs.jl that implements the
87+
`f(d, jitter)` has the type `AbstractMvNormal`, and is the bit of AbstractGPs.jl that implements the
8688
Distributions.jl interface, so it's legal to put it on the right-hand side
8789
of a `~`.
8890
From this you should deduce that `f_latent` is distributed according to a multivariate
@@ -145,7 +147,7 @@ this example. See Turing.jl's docs on Automatic Differentiation for more info.
145147
using Random, ReverseDiff
146148
147149
m_post = m | (y=df.y,)
148-
chn = sample(Xoshiro(123456), m_post, NUTS(;adtype=AutoReverseDiff()), 1_000, progress=false)
150+
chn = sample(Xoshiro(123456), m_post, NUTS(; adtype=AutoReverseDiff()), 1_000, progress=false)
149151
```
150152

151153
We can use these samples and the `posterior` function from `AbstractGPs` to sample from the

0 commit comments

Comments
 (0)