HeteroscedasticGaussian#

class gpjax.likelihoods.HeteroscedasticGaussian(num_datapoints: 'int', noise_prior: 'Prior', noise_transform: 'tp.Union[AbstractNoiseTransform, tp.Callable[[Float[Array, ...]], Float[Array, ...]]]' = SoftplusTransform(), integrator: 'AbstractIntegrator' = <gpjax.integrators.GHQuadratureIntegrator object at 0x7f302bacfb90>)[source]#

Bases: AbstractHeteroscedasticLikelihood

Expand for references to gpjax.likelihoods.HeteroscedasticGaussian

Heteroscedastic Inference / Background

Parameters:
expected_log_likelihood(y, mean, variance, mean_g=None, variance_g=None, noise_stats=None, return_parts=False, **_)[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.

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

  • noise_stats (NoiseMoments | None)

  • return_parts (bool)

  • **_

Returns:

The expected log likelihood.

Return type:

ScalarFloat

The conditional observation density \(p(y \mid f, g)\).

For a heteroscedastic likelihood the observation noise is itself a function of a second latent process \(g\), so the conditional is \(\mathcal{N}(y \mid f, \sigma^2(g))\) (Lázaro-Gredilla & Titsias, 2011). Unlike the homoscedastic likelihoods, \(f\) alone does not determine the density, so g is required.

Parameters:
  • f (Float[Array, "..."]) – the latent signal process values.

  • g (Float[Array, "..."] | None) – the latent noise process values. Required — there is no conditional density without it.

Returns:

The observation density given both latent processes.

Return type:

npd.Normal

Raises:

ValueError – If g is not supplied.

predict(dist, noise_dist=None)[source]#

Evaluate the likelihood function at a given predictive distribution.

Parameters:
Returns:

The predictive distribution.

Return type:

npd.Distribution

supports_tight_bound()[source]#

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

Return type:

bool