prior =============== .. py:module:: jaxns.framework.prior .. rubric:: :code:`jaxns.framework.prior` .. rubric:: Module Contents .. py:exception:: InvalidPriorName(name = None) Bases: :py:obj:`Exception` Raised when a prior name is already taken. Initialize self. See help(type(self)) for accurate signature. .. py:class:: Prior(dist_or_value, name = None) Bases: :py:obj:`jaxns.framework.bases.BaseAbstractPrior` Represents a generative prior. .. py:attribute:: name :value: None .. py:property:: dist :type: jaxns.framework.bases.BaseAbstractDistribution .. py:property:: value :type: jax.Array .. py:method:: parametrised(random_init = False) Convert this prior into a non-Bayesian parameter, that takes a single value in the model, but still has an associated log_prob. The parameter is registered as a `get_parameter` with added `_param` name suffix. Prior must have a name. :param random_init: whether to initialise the parameter randomly or at the median of the distribution. :returns: A singular prior. :raises ValueError: if the prior has no name.