gwkokab.analysis.utils.priorsΒΆ
FunctionsΒΆ
|
Conditional Dirichlet Distribution. |
|
Get the processed priors from a list of parameters. |
Module ContentsΒΆ
- gwkokab.analysis.utils.priors.DirichletElement(order: int, n_dimensions: int, validate_args: bool | None = None, **kwargs) numpyro.distributions.DistributionΒΆ
Conditional Dirichlet Distribution.
A DirichletElement is a distribution over the \(N\)-dimensional simplex, where \(N\) is the
n_dimensionsparameter. The \(n\)-th order Dirichlet distribution given by theorder. The distribution is defined as,\[\forall n \in \{0, N-2\}, p(x_n \mid x_0, \cdots, x_{n-1}) = \frac{(N-n-1)(1-\alpha_n-x_n)^{N-n-1}}{(1-\alpha_n)^{N-n-1}}, \qquad x_n \in [0, \alpha_n]\]where \(\alpha_n = \sum_{i=0}^{n-1} \alpha_i\) and \(x_n\) is the
order-th element of the simplex.\[p(x_{N-1}\mid x_0, \cdots, x_{N-2}) = \frac{1}{1-\alpha_{N-1}}, \qquad x_{N-1} \in [0,\alpha_{N-1}]\]- Parameters:
- Returns:
DirichletElement distribution
- Return type:
Distribution
- Raises:
KeyError β Missing concentration parameters for DirichletElement of order {order}
- gwkokab.analysis.utils.priors.get_processed_priors(params: List[str], priors: dict) dictΒΆ
Get the processed priors from a list of parameters.
A processed prior is either an instantiated prior or a tuple of
(jax.tree_util.Partial, lazy_vars)wherelazy_varsis a dictionary of lazy variables.- Parameters:
- Returns:
dictionary of processed priors
- Return type:
- Raises:
ValueError β if the prior value is invalid