Skip to content

Commit e9f1a28

Browse files
committed
Update docstring
1 parent 82e2100 commit e9f1a28

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

src/expectations.jl

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,18 @@ default_expectation_method(_) = GaussHermiteExpectation(20)
2929
y::AbstractVector,
3030
)
3131
32-
This function computes the expected log likelihood:
33-
34-
```math
35-
∫ q(f) log p(y | f) df
36-
```
37-
where `p(y | f)` is the process likelihood. This is described by `lik`, which should be a
38-
callable that takes `f` as input and returns a Distribution over `y` that supports
39-
`loglikelihood(lik(f), y)`.
40-
41-
`q(f)` is an approximation to the latent function values `f` given by:
32+
This function computes the sum of the expected log likelihoods:
4233
```math
43-
q(f) = ∫ p(f | u) q(u) du
34+
∑ᵢ ∫ qᵢ(f) log pᵢ(yᵢ | f) df
4435
```
45-
where `q(u)` is the variational distribution over inducing points.
46-
The marginal distributions of `q(f)` are given by `q_f`.
36+
where `pᵢ(yᵢ | f)` is the process likelihood and `yᵢ` the observation at location/site `i`.
37+
The argument `q_f` is the vector of normal distributions `qᵢ(f)`, and the argument `y` is
38+
the vector of observations `yᵢ`. The argument `lik` is one of the following:
39+
- A callable that takes `f` as input and returns a Distribution over `y` that supports `loglikelihood(lik(f), y)`. This corresponds to the case where `pᵢ` is independent of `i`.
40+
- A vector of such callables. Here, each element of the vector is the corresponding `pᵢ`.
4741
4842
`quadrature` determines which method is used to calculate the expected log
4943
likelihood.
50-
51-
# Extended help
52-
53-
`q(f)` is assumed to be an `MvNormal` distribution and `p(y | f)` is assumed to
54-
have independent marginals such that only the marginals of `q(f)` are required.
5544
"""
5645
expected_loglikelihood(quadrature, lik, q_f, y)
5746

0 commit comments

Comments
 (0)