Skip to content

Commit

Permalink
Update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
simsurace committed Mar 11, 2024
1 parent 82e2100 commit e9f1a28
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/expectations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,18 @@ default_expectation_method(_) = GaussHermiteExpectation(20)
y::AbstractVector,
)
This function computes the expected log likelihood:
```math
∫ q(f) log p(y | f) df
```
where `p(y | f)` is the process likelihood. This is described by `lik`, which should be a
callable that takes `f` as input and returns a Distribution over `y` that supports
`loglikelihood(lik(f), y)`.
`q(f)` is an approximation to the latent function values `f` given by:
This function computes the sum of the expected log likelihoods:
```math
q(f) = ∫ p(f | u) q(u) du
∑ᵢ ∫ qᵢ(f) log pᵢ(yᵢ | f) df
```
where `q(u)` is the variational distribution over inducing points.
The marginal distributions of `q(f)` are given by `q_f`.
where `pᵢ(yᵢ | f)` is the process likelihood and `yᵢ` the observation at location/site `i`.
The argument `q_f` is the vector of normal distributions `qᵢ(f)`, and the argument `y` is
the vector of observations `yᵢ`. The argument `lik` is one of the following:
- 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`.
- A vector of such callables. Here, each element of the vector is the corresponding `pᵢ`.
`quadrature` determines which method is used to calculate the expected log
likelihood.
# Extended help
`q(f)` is assumed to be an `MvNormal` distribution and `p(y | f)` is assumed to
have independent marginals such that only the marginals of `q(f)` are required.
"""
expected_loglikelihood(quadrature, lik, q_f, y)

Expand Down

0 comments on commit e9f1a28

Please sign in to comment.