Package: distributions¶
Nodes for interacting with probability distributions.
These nodes can be used to create various kinds of common probability distributions and compute their quantities such as mean, variance, or entropy of the distribution, the log-probability of given data point(s), or draw samples from the distribution.
Similarly to the array creation nodes, these nodes likewise allow the user to optionally choose one of several backend implementations of otherwise mathematically equivalent distributions. This is taken care of automatically when using the nodes in a context such as bayesian inference. Outside these contexts, the default backend (numpy/scipy) is fine for most scientific computing, but when used with the (gradient-)based methods in the optimization category, one of the jax-based backends may have to be chosen. Node classes in this package are: - nodes ending in Distribution: these are the predefined distribution types - nodes starting in Distribution: these are nodes that compute quantities from distributions, such as the CDF, entropy, mean, etc.
Nodes in this package:
-
Bernoulli Distribution
Specify a Bernoulli distribution given a probability of a success. -
Beta-Binomial Distribution
Specify a Beta-Binomial distribution with a total count n and shape parameters alpha, beta. -
Beta Distribution
Specify a Beta distribution with shape parameters alpha and beta. -
Binomial Distribution
Specify a Binomial distribution given a total number of trials n and probability of a success p. -
Categorical Distribution
Specify a categorical distribution given the probability p_i of each of k possible discrete outcomes. -
Cauchy Distribution
Specify a Cauchy distribution with a given location x0 and scale lambda. -
Chi-squared Distribution
Specify a Chi-squared distribution with given degrees of freedom k. -
Dirichlet Distribution
Specify a Dirichlet distribution with a vector of given concentrations alpha. -
Dirichlet-Multinomial Distribution
Specify a Dirichlet-Multinomial distribution with a given total count n and concentrations alpha. -
CDF (Cumulative Distribution Function) (Distribution)
Calculate the cumulative distribution function (CDF) of a provided (wired-in) probability distribution at the given point(s) in the event space. -
Entropy (Distribution)
Calculate the entropy of a provided (wired-in) probability distribution. -
Highest Probability Density Interval (HPDI) (Distribution)
Calculate the highest probability density interval (HPDI) of a provided (wired-in) probability distribution. -
Inverse CDF (Cumulative Distribution Function) (Distribution)
Calculate the inverse cumulative distribution function (iCDF) of a provided (wired-in) probability distribution at the given quantile(s). -
Interquartile Range (IQR) (Distribution)
Calculate the interquartile range (difference of 75th and 25th percentile of a provided (wired-in) probability distribution. -
Mean (Distribution)
Calculate the mean (expected value) of a provided (wired-in) probability distribution. -
Median (Distribution)
Calculate the median (robust location) of a provided (wired-in) probability distribution. -
Median Absolute Deviation (MAD) (Distribution)
Calculate the median absolute deviation (the median of absolute differences from the distribution's median) of a provided (wired-in) probability distribution. -
Mode (Distribution)
Calculate the mthe mode (location of maximum value) of a provided (wired-in) probability distribution. -
Probability Density or Mass (Distribution)
Calculate the probability density of a wired-in probability distribution at the given point(s) in event space, by default in log space (i.e -
Get Property (Distribution)
Get a specified property of the given distribution. -
Standard Deviation (Distribution)
Calculate the standard deviation of a provided (wired-in) probability distribution. -
Variance (Distribution)
Calculate the variance (expected value) of a provided (wired-in) probability distribution. -
Exponential Distribution
Specify a Exponential distribution with given rate parameter lambda. -
Gamma Distribution
Specify a Gamma distribution with a given concentration alpha and rate beta. -
Generalized Extreme Value (GEV) Distribution
Specify a Generalized Extreme Value distribution with a given location mu, scale sigma, and (signed) shape parameter zeta. -
Generalized Normal Distribution
Specify a Generalized Normal distribution with a given location mu, scale sigma, and shape parameter beta. -
Generalized Pareto Distribution
Specify a Generalized Pareto distribution with a given location mu, scale sigma, and shape parameter zeta. -
Geometric Distribution
Specify a Geometric distribution given a probability of a success p. -
Gumbel Distribution
Specify a Gumbel distribution with a given location mu and scale beta. -
Half-Cauchy Distribution
Specify a half-Cauchy distribution with a given scale gamma. -
Half-Normal Distribution
Specify a half-normal distribution with a given scale sigma. -
Inverse-Gamma Distribution
Specify a Inverse-Gamma distribution with a given concentration alpha and rate beta. -
Kumaraswamy Distribution
Specify a Kumaraswamy distribution with shape parameters alpha and beta. -
LKJ Distribution
Specify an LKJ (Lewandowski-Kurowicka-Joe) distribution of correlation matrices parameterized by dimensionality dim and a concentration η, where matrices are of shape (dim x dim). -
Laplace Distribution
Specify a Laplace distribution with a given location mu and scale b. -
Log-Normal Distribution
Specify a Log-Normal distribution with a given location mu and scale sigma. -
Logistic Distribution
Specify a Logistic distribution with a given location mu and scale s. -
Multinomial Distribution
Specify a Multinomial distribution given a total number of trials n and the probabilities alpha_i of k different possible outcomes in each trial. -
Multivariate Normal Distribution
Specify a multivariate normal distribution. -
Multivariate Student-t Distribution
Specify a multi-variate Student-t distribution, parameterized by degrees of freedom nu, a location vector mu, and a lower-triangular scale matrix L. -
Negative-Binomial Distribution
Specify a negative Binomial distribution given a total number of trials n and probability of a success p. -
Normal Distribution
Specify a normal (aka Gaussian) distribution with a given location mu and scale sigma. -
Pareto Distribution
Specify a Pareto distribution with a concentration parameter alpha and and scale parameter x_m. -
Poisson Distribution
Specify a Poisson distribution with a given rate lambda. -
Relaxed Bernoulli Distribution
Specify a Relaxed Bernoulli distribution given a temperature tau and probability of a success p. -
Spherical Uniform Distribution
Specify a spherical uniform distribution in d-dimensional space, yielding random d-dimensional vectors of unit length. -
Student-t Distribution
Specify a Student-t distribution with a given degrees of freedom nu and optionally location mu and scale sigma. -
Tractable Multivariate Normal Distribution
Specify a tractable multivariate normal (aka Gaussian) distribution parameterized by a location mu, a diagonal vector D, and a tall low-rank factor U. -
Truncated Normal Distribution
Specify a truncated normal distribution with a given location mu, scale sigma, and low/high truncation points a and b. -
Uniform Distribution
Specify a Uniform distribution covering the interval between a low value a and high value b. -
Von-Mises Distribution
Specify a von Mises distribution with a given location mu and concentration k. -
Von Mises-Fisher Distribution
Specify a von Mises-Fisher Distribution given a preferential mean direction mu and concentration parameter kappa. -
Weibull Distribution
Specify a Weibull distribution with a given scale lambda and concentration k. -
Wishart Distribution
Specify a Wishart distribution of positive definite matrices, parameterized by degrees of freedom nu and a lower-triangular scale matrix L.