Likelihood#

class cuqi.likelihood.Likelihood(distribution, data)#

Likelihood function defined from a conditional distribution and some observed data.

The parameters of the likelihood function is defined as the conditioning variables of a conditional distribution.

The geometry is automatically determined from the model of data distribution. Generates instance of cuqi.likelihood.Likelihood

Parameters:
  • distribution (Distribution) –

    Distribution to create likelihood from.

  • data (CUQIarray or array_like) –

    Observation to create likelihood from.

__init__(distribution, data)#

Methods

__init__(distribution, data)

disable_FD()

Call disable_FD of the underlying distribution

enable_FD([epsilon])

Call enable_FD of the underlying distribution

get_parameter_names()

Return parameter names of likelihood

gradient(*args, **kwargs)

Returns the gradient of the log density at x.

logd(*args, **kwargs)

Evaluates the un-normalized log density function given a set of parameters.

Attributes

FD_enabled

Return FD_enabled of the likelihood from the underlying distribution

FD_epsilon

Return FD_epsilon of the likelihood from the underlying distribution

dim

Return dimension of likelihood

fun_shape

Return function space shape of likelihood

geometry

Return geometry of likelihood

model

Extract model from data distribution.

name

Return name of likelihood

par_shape

Return parameter shape of likelihood