bilby.compat.jax.JittedLikelihood

class bilby.compat.jax.JittedLikelihood(likelihood, cast_to_float=True)[source]

Bases: Likelihood

A wrapper to just-in-time compile a Bilby likelihood for use with jax.

Parameters:
likelihood: bilby.core.likelihood.Likelihood

The likelihood to wrap.

cast_to_float: bool

Whether to return a float instead of a jax.Array.

__init__(likelihood, cast_to_float=True)[source]

Empty likelihood class to be subclassed by other likelihoods

__call__(*args, **kwargs)

Call self as a function.

Methods

__init__(likelihood[, cast_to_float])

Empty likelihood class to be subclassed by other likelihoods

log_likelihood(parameters)

log_likelihood_ratio(parameters)

Difference between log likelihood and noise log likelihood

noise_log_likelihood()

Attributes

marginalized_parameters

meta_data

log_likelihood(parameters)[source]
Parameters:
parameters: dict

A dictionary of the parameter names and associated values

Returns:
float
log_likelihood_ratio(parameters)[source]

Difference between log likelihood and noise log likelihood

Parameters:
parameters: dict

A dictionary of the parameter names and associated values

Returns:
float
noise_log_likelihood()[source]
Returns:
float