construct_posterior#

gpjax.gps.construct_posterior(prior, likelihood)[source]#

Utility function for constructing a posterior object from a prior and likelihood. The function will automatically select the correct posterior object based on the likelihood.

Parameters:
  • prior (Prior) – The Prior distribution.

  • likelihood (AbstractLikelihood) – The likelihood that represents our beliefs around the distribution of the data.

Returns:

A posterior distribution. If the likelihood is

Gaussian, then a ConjugatePosterior will be returned. Otherwise, a NonConjugatePosterior will be returned.

Return type:

AbstractPosterior