distributions
57 memberslucid.distributions`lucid.distributions` — probability distributions with the reference-framework's interface (sample / rsample / log_prob / entropy / …).
Classes
Bernoulli7 methodsBernoulli distribution over $\{0, 1\}$.
Geometric6 methodsGeometric distribution: number of failures before the first success.
Categorical6 methodsCategorical distribution — a discrete distribution over K labelled outcomes.
OneHotCategorical5 methodsCategorical distribution with one-hot encoded samples.
FisherSnedecor5 methodsFisher-Snedecor F-distribution — ratio of two scaled Chi-squared variates.
HalfCauchy3 methodsHalf-Cauchy distribution — the absolute value of a zero-location Cauchy.
HalfNormal6 methodsHalf-Normal distribution — the absolute value of a zero-mean Normal.
Pareto7 methodsPareto distribution — a heavy-tailed power-law family on $[x_m, \infty)$.
Weibull7 methodsWeibull distribution — a flexible family for lifetime and survival analysis.
Binomial6 methodsBinomial distribution over the number of successes in n independent trials.
NegativeBinomial5 methodsNegative Binomial distribution over the number of failures before r successes.
Poisson7 methodsPoisson distribution over the non-negative integers.
Distribution15 methodsAbstract base for a probability distribution.
ExponentialFamilyMix-in for exponential-family distributions.
Cauchy5 methodsCauchy distribution on $\mathbb{R}$ — heavy-tailed, all moments undefined.
Exponential9 methodsExponential distribution on $[0, \infty)$.
Laplace7 methodsLaplace (double-exponential) distribution on $\mathbb{R}$.
Beta6 methodsBeta distribution on the open interval $(0, 1)$.
Chi21 methodsChi-squared distribution with $k$ degrees of freedom.
Dirichlet6 methodsDirichlet distribution on the $K$-simplex.
Gamma7 methodsGamma distribution on $(0, \infty)$ — shape/rate parameterisation.
Independent10 methodsRe-interpret rightmost batch dimensions of a base distribution as event dims.
MixtureSameFamily5 methodsFinite mixture model where all components share the same distribution family.
MultivariateNormal8 methodsMultivariate Normal (Gaussian) distribution in $\mathbb{R}^D$.
LogNormal7 methodsLog-Normal distribution: $X = \exp(Y)$ where $Y \sim \mathcal{N}(\mu, \sigma^2)$.
Normal10 methodsUnivariate Gaussian (Normal) distribution $\mathcal{N}(\mu, \sigma^2)$.
RelaxedBernoulli3 methodsConcrete (Gumbel-sigmoid) relaxation of the Bernoulli distribution.
RelaxedOneHotCategorical3 methodsConcrete distribution — a continuous relaxation of OneHotCategorical.
StudentT7 methodsStudent's t-distribution with location, scale, and degrees of freedom.
AbsTransform1 methodsElement-wise absolute value $y = |x|$ (folded, **not** bijective).
AffineTransform2 methodsElement-wise affine bijection $y = \mathrm{loc} + \mathrm{scale}\cdot x$.
CatTransform2 methodsApply different transforms to contiguous partitions along an axis.
ComposeTransform2 methodsFunction composition of a list of transforms — left-to-right.
CorrCholeskyTransform2 methodsBijection from $\mathbb{R}^{d(d-1)/2}$ to Cholesky factors of correlation matrices.
CumulativeDistributionTransform2 methodsProbability-integral transform $y = F(x)$ via a base distribution's CDF.
ExpTransform1 methodsElement-wise exponential bijection $y = e^x$.
IndependentTransform2 methodsReinterpret `n` trailing batch dimensions of an inner transform as event dims.
LowerCholeskyTransform1 methodsBijection mapping an unconstrained matrix to a positive-diagonal Cholesky factor.
PowerTransform2 methodsElement-wise power bijection $y = x^{\mathrm{exponent}}$.
ReshapeTransform2 methodsPure-shape reinterpretation of the event shape $y = \mathrm{reshape}(x)$.
SigmoidTransform1 methodsElement-wise sigmoid bijection $y = \sigma(x) = 1/(1 + e^{-x})$.
SoftmaxTransform1 methodsSoftmax transform mapping $\mathbb{R}^K \to \Delta^{K-1}$.
StackTransform2 methodsApply a list of transforms to indexed slices along a stack axis.
StickBreakingTransform1 methodsLogistic stick-breaking bijection $\mathbb{R}^{K-1} \to \Delta^{K-1}$.
TanhTransform1 methodsElement-wise hyperbolic tangent bijection $y = \tanh(x)$.
Transform5 methodsAbstract bijection between two measurable spaces.
TransformedDistribution5 methodsPushforward of a base distribution through a (composite) bijector.
ContinuousBernoulli5 methodsContinuous Bernoulli distribution on $[0, 1]$.
Gumbel7 methodsGumbel (Type-I extreme value) distribution on $\mathbb{R}$.
InverseGamma6 methodsInverse-Gamma distribution on $(0, \infty)$.
Kumaraswamy6 methodsKumaraswamy distribution on $(0, 1)$.
Multinomial7 methodsMultinomial distribution over $K$ categories.
LKJCholesky4 methodsLKJ distribution over Cholesky factors of correlation matrices.
Wishart6 methodsWishart distribution over symmetric positive-definite matrices.
Uniform9 methodsContinuous Uniform distribution on the half-open interval $[a, b)$.