special_priors ======================== .. py:module:: jaxns.framework.special_priors .. rubric:: :code:`jaxns.framework.special_priors` .. rubric:: Module Contents .. py:class:: Bernoulli(*, logits=None, probs=None, name = None) Bases: :py:obj:`SpecialPrior` The base prior class with public methods. .. py:attribute:: dist .. py:class:: Beta(*, concentration0=None, concentration1=None, name = None) Bases: :py:obj:`SpecialPrior` The base prior class with public methods. .. py:class:: Categorical(parametrisation, *, logits=None, probs=None, name = None) Bases: :py:obj:`SpecialPrior` The base prior class with public methods. Initialised Categorical special prior. :param parametrisation: 'cdf' is good for discrete params with correlation between neighbouring categories, otherwise gumbel is better. :param logits: log-prob of each category :param probs: prob of each category :param name: optional name .. py:attribute:: dist .. py:class:: ForcedIdentifiability(*, n, low=None, high=None, fix_left = False, fix_right = False, name = None) Bases: :py:obj:`SpecialPrior` Prior for a sequence of `n` random variables uniformly distributed on U[low, high] such that U[i,...] <= U[i+1,...]. For broadcasting the resulting random variable is sorted on the first dimension elementwise. :param n: number of samples within [low,high] :param low: minimum of distribution :param high: maximum of distribution :param fix_left: if True, the leftmost value is fixed to `low` :param fix_right: if True, the rightmost value is fixed to `high` .. py:attribute:: n .. py:attribute:: low .. py:attribute:: high .. py:attribute:: fix_left :value: False .. py:attribute:: fix_right :value: False .. py:class:: Poisson(*, rate=None, log_rate=None, name = None) Bases: :py:obj:`SpecialPrior` The base prior class with public methods. .. py:attribute:: dist .. py:class:: UnnormalisedDirichlet(*, concentration, name = None) Bases: :py:obj:`SpecialPrior` Represents an unnormalised dirichlet distribution of K classes. That is, the output is related to the K-simplex via normalisation. X ~ UnnormalisedDirichlet(alpha) Y = X / sum(X) ==> Y ~ Dirichlet(alpha) .. py:class:: Empirical(*, samples, support_min = None, support_max = None, resolution = 100, name = None) Bases: :py:obj:`SpecialPrior` Represents the empirical distribution of a set of 1D samples, with arbitrary batch dimension. .. py:class:: TruncationWrapper(prior, low, high, name = None) Bases: :py:obj:`SpecialPrior` Wraps another prior to make it truncated. For truncated distribution the quantile transforms to: Q_truncated(p) = Q_untruncated( p * (F_truncated(high) - F_truncated(low)) + F_truncated(low)) And the CDF transforms to: F_truncated(x) = (F_untruncated(x) - F_untruncated(low)) / (F_untruncated(high) - F_untruncated(low)) .. py:attribute:: prior .. py:attribute:: low .. py:attribute:: high .. py:attribute:: cdf_low .. py:attribute:: cdf_diff .. py:class:: ExplicitDensityPrior(*, axes, density, regular_grid = False, name = None) Bases: :py:obj:`SpecialPrior` The base prior class with public methods.