abc ============= .. py:module:: jaxns.framework.abc .. rubric:: :code:`jaxns.framework.abc` .. rubric:: Module Contents .. py:class:: AbstractPrior Bases: :py:obj:`abc.ABC` Represents a generative prior. .. py:class:: AbstractModel Bases: :py:obj:`abc.ABC` Represents a Bayesian model in terms of a generative prior, and likelihood function. .. py:method:: __hash__() :abstractmethod: Hash of the model. .. py:method:: sample_U(key) :abstractmethod: Sample uniformly from the prior in U-space. :param key: PRNGKey :returns: U-space sample .. py:method:: transform(U) :abstractmethod: Compute the prior sample. :param U: U-space sample :returns: prior sample .. py:method:: transform_parametrised(U) :abstractmethod: Compute the parametrised prior variables. :param U: U-space sample :returns: prior sample .. py:method:: forward(U, allow_nan = False) :abstractmethod: Compute the log-likelihood. :param U: U-space sample :param allow_nan: whether to allow nans in likelihood :returns: log likelihood at the sample .. py:method:: log_prob_likelihood(U, allow_nan = False) Compute the log-likelihood. :param U: U-space sample :param allow_nan: whether to allow nans in likelihood :returns: log likelihood at the sample .. py:method:: log_prob_prior(U) :abstractmethod: Computes the log-probability of the prior. :param U: The U-space sample :returns: the log probability of prior .. py:method:: log_prob_joint(U, allow_nan) Computes the log-joint probability of the model. :param U: The U-space sample :param allow_nan: whether to allow nans in likelihood :returns: the log joint probability of the model .. py:method:: prepare_input(U) :abstractmethod: Prepares the input for the likelihood function. :param U: The U-space sample :returns: the input to the likelihood function .. py:method:: sanity_check(key, S) :abstractmethod: Performs a sanity check on the model. :param key: PRNGKey :param S: number of samples to check :raises AssertionError: if any of the samples are nan. .. py:class:: AbstractDistribution Bases: :py:obj:`abc.ABC` Represents adistribution.