Approximation methods

When the input $x$ to a GP node is itself uncertain (i.e. a distribution rather than a point), kernel expectations of the form $\mathbb{E}_{q(x)}[k(x, x')]$ must be approximated. RxGP provides approximation methods for this purpose.

Generalized Unscented Transform

RxGP.GenUnscentedType

The GenUnscented structure defines the approximation method of Generalized Unscented Transform.

source

GenUnscented (aliases: GenUT, GenUnscentedTransform) extends the classical Unscented Transform by incorporating skewness and kurtosis of the input distribution to select sigma points and weights. This is particularly useful for non-Gaussian input beliefs.

The sigma points and weights are computed from the first four moments of the distribution:

  • Mean $\mu$
  • Covariance $\Sigma$
  • Skewness $\gamma_1$
  • Excess kurtosis $\gamma_2$

Kernel expectation approximation

RxGP.approximate_kernel_expectationFunction
approximate_kernel_expectation(method::AbstractApproximationMethod, g::Function, distribution)

Approximate the expectation $\mathbb{E}_{q(x)}[g(x)]$ where $x \sim$ distribution using the specified approximation method.

source

These functions approximate expectations of the form:

\[\bar{g} = \mathbb{E}_{q(x)}\bigl[g(x)\bigr] \approx \sum_{i} w_i \, g(\sigma_i)\]

where $\sigma_i$ are the sigma/quadrature points and $w_i$ the corresponding weights.

The in-place variant approximate_kernel_expectation! writes the result into a pre-allocated array, avoiding allocations in hot loops.

Supported approximation methods

MethodTypeDescription
GenUnscentedGenUnscented()Generalized Unscented Transform using skewness and kurtosis
Gauss-Hermitevia ReactiveMP's ghcubatureStandard cubature-based approximation
Tip

For uncertain inputs, always set the method field in your meta object (e.g. method = GenUnscented()). When inputs are observed as PointMass, no approximation is needed and the kernel expectations reduce to exact evaluations.