AbstractHeteroscedasticLikelihood#

class gpjax.likelihoods.AbstractHeteroscedasticLikelihood(noise_transform=SoftplusTransform(), integrator=<gpjax.integrators.GHQuadratureIntegrator object>)[source]#

Bases: AbstractLikelihood

Base class for heteroscedastic likelihoods with latent noise processes.

Parameters:
expected_log_likelihood(y, mean, variance, mean_g=None, variance_g=None, **kwargs)[source]#

Compute the expected log likelihood.

For a variational distribution \(q(f)\sim\mathcal{N}(m, s)\) and a likelihood \(p(y|f)\), compute the expected log likelihood:

\[\mathbb{E}_{q(f)}\left[\log p(y|f)\right]\]
Parameters:
  • y (Float[Array, 'N D']) – The observed response variable.

  • mean (Float[Array, 'N D']) – The variational mean.

  • variance (Float[Array, 'N D']) – The variational variance.

  • mean_g (Float[Array, 'N D']) – Optional moments of the latent noise process for heteroscedastic likelihoods.

  • variance_g (Float[Array, 'N D']) – Optional moments of the latent noise process for heteroscedastic likelihoods.

  • **_ – Unused extra arguments for compatibility with specialised likelihoods.

  • kwargs (Any)

Returns:

The expected log likelihood.

Return type:

ScalarFloat

noise_statistics(mean, variance)[source]#

Moment matching of the transformed noise process.

Parameters:
  • mean (Float[jaxlib._jax.Array, 'N D'] | Float[ndarray, 'N D']) – Mean of the latent noise GP.

  • variance (Float[jaxlib._jax.Array, 'N D'] | Float[ndarray, 'N D']) – Variance of the latent noise GP.

Returns:

Expected log variance, inverse variance, and variance.

Return type:

NoiseMoments

supports_tight_bound()[source]#

Return whether the tighter bound from Lazaro-Gredilla & Titsias (2011) is applicable.

Return type:

bool