GaussianLikelihood

class pmrf.likelihoods.GaussianLikelihood(noise: AbstractVariable | Inexact[jaxlib._jax.Array, '...'] | Callable[[Array], Array])

Bases: AbstractLikelihood

Gaussian likelihood with independent noise.

Maps measurement noise to a normal distribution over frequency. The noise model is responsibile for returning the measurement variance.

Given an input y of shape (*batch_shape, event_dims), the noise model must accept accept the prediction y and return an array that is either broadcastable to (*batch_shape) or to the full (*batch_shape, event_dims).

Parameters:

noise (Param | Callable[[jnp.ndarray], jnp.ndarray]) – A parameter or callable that evaluates to the measurement variance. The callable accepts the mean prediction as an argument and outputs the variance, and can be a function or a callable PyTree with additional parameters.

__call__(y_event: Array | AbstractDistribution) AbstractDistribution

Evaluate the likelihood given model predictions.

Parameters:

y_event (jnp.ndarray | AbstractDistribution) – The model prediction or predictive distribution in event space.

Returns:

The probability distribution over the observed data.

Return type:

AbstractDistribution

noise: AbstractVariable | Inexact[jaxlib._jax.Array, '...'] | Callable[[Array], Array]

The noise parameter or a callable returning the measurement variance.