ConjugateComputationVI.GaussHermiteQuadratureType
GaussHermiteQuadrature(num_points::Int)

Specify that the expectation required for the reconstruction term is to be computed using Gauss-Hermite quadrature with num_points quadrature points.

ConjugateComputationVI.UnivariateFactorisedLikelihoodType
UnivariateFactorisedLikelihood(build_lik)

A likelihood function which factorises across inputs. Applying this likelihood to any vector f::AbstractVector{<:Real} yields a Product distribution. Exposing this structure is useful when working with quadrature methods.

AbstractGPs.elboMethod
elbo(
    f::AbstractGP,
    x::AbstractVector,
    η1::AbstractVector{<:Real},
    η2::AbstractVector{<:Real},
    r,
)

Compute the evidence lower bound associated with the GP f, with reconstruction term r, variational parameters η1 and η2, and collection of inputs x.

ConjugateComputationVI.approx_posteriorMethod
approx_posterior(
    f::AbstractGP,
    x::AbstractVector,
    η1::AbstractVector{<:Real},
    η2::AbstractVector{<:Real},
)

Compute the approximate posterior. This is just a posterior GP some kind, which is another AbstractGP.

ConjugateComputationVI.batch_quadratureMethod
batch_quadrature(
    fs::AbstractVector,
    ms::AbstractVector{<:Real},
    σs::AbstractVector{<:Real},
    num_points::Integer,
)

Approximate the integrals

∫ fs[n](x) pdf(Normal(ms[n], σs[n]), x) dx

for all n in eachindex(fs) using Gauss-Hermite quadrature with num_points.

ConjugateComputationVI.gaussian_reconstruction_termMethod
gaussian_reconstruction_term(
    y::AbstractVector{<:Real},
    σ²::AbstractVector{<:Real},
    m̃::AbstractVector{<:Real},
    σ̃²::AbstractVector{<:Real},
)

Computes

∫ logpdf(Normal(f, σ²[n]), y[n]) pdf(Normal(m̃[n], σ̃²[n]), f) df

for each n ∈ eachindex(y).

ConjugateComputationVI.optimize_elboMethod
optimize_elbo(
    build_latent_gp,
    integrater::AbstractIntegrater,
    x::AbstractVector,
    y::AbstractVector,
    θ0::AbstractVector{<:Real},
    optimiser,
    options,
)

Optimise the elbo w.r.t. model parameters.

Arguments

  • build_latent_gp: a unary function accepting an AbstractVector{<:Real} returning a LatentGP
  • integrater::AbstractIntegrater: an object specifying how to perform inference
  • x::AbstractVector: a collection of inputs
  • y::AbstractVector: a collection of outputs
  • θ0::AbstractVector{<:Real}: initial model parameter values
  • optimiser: an optimiser that can be passed to Optim.optimize
  • options: options to be passed to Optim.optimize

Returns

  • AbstractGP: the approximate posterior at the optimum
  • NamedTuple: results summary containing various useful bits of information