Univariate Families¶
This page is the practical catalog for scalar distributions in mixle.stats.
The generated API reference lists every class and method; this page explains
which family to choose, what support it assumes, and how scalar families
compose into larger Mixle models.
The naming pattern is consistent:
FooDistributionis a fitted probability model.FooEstimatoris the object passed tooptimizeto fit that family.FooEnumeratorexists only for families with finite or countable support where exact support traversal is implemented.
Most scalar families are re-exported from mixle.stats:
from mixle.inference import optimize
from mixle.stats import GammaEstimator, GaussianEstimator, PoissonEstimator
duration = optimize(durations, GammaEstimator(), out=None)
residual = optimize(residuals, GaussianEstimator(), out=None)
counts = optimize(event_counts, PoissonEstimator(), out=None)
Continuous Families¶
Family |
Support |
Use when |
|---|---|---|
|
real line |
symmetric residuals, measurement noise, simple continuous baselines. |
|
real line |
residuals have heavier tails than a Gaussian. |
|
real line |
residuals are continuous but asymmetric. |
|
real line |
sharper center and heavier tails than Gaussian. |
|
real line |
symmetric real-valued data with logistic tails. |
|
bounded interval |
only a finite range is known or a flat baseline is needed. |
|
|
proportions, probabilities, or bounded rates. |
|
positive real |
durations, magnitudes, waiting times, positive skew. |
|
non-negative real |
memoryless waiting-time baseline. |
|
non-negative real |
failure times and hazards that rise or fall with age. |
|
positive real |
multiplicative noise or log-normal-like magnitudes. |
|
positive real |
variance-like positive quantities and Bayesian scale components. |
|
positive real |
first-passage-time-like positive data. |
|
non-negative real |
magnitudes of zero-centered Gaussian errors. |
|
non-negative real |
radial magnitudes from two Gaussian components. |
|
non-negative real |
magnitude with nonzero signal plus Gaussian noise. |
|
non-negative real |
flexible fading or positive magnitude data. |
|
tail above a threshold |
heavy-tailed size, wealth, severity, or frequency data. |
|
threshold exceedances |
peaks-over-threshold extreme-value modeling. |
|
real line with shape-dependent tail |
block maxima or minima. |
|
real line |
light-tailed extreme-value baseline. |
|
real line |
symmetric residuals with tunable tail shape. |
|
real line with right skew |
Gaussian noise plus exponential delay. |
|
power-variance support |
compound-like continuous/count mass patterns. |
Discrete Families¶
Family |
Support |
Use when |
|---|---|---|
|
arbitrary labels |
labels, tokens, classes, states, finite outcomes. |
|
integer labels |
dense integer-valued categories where integer encoders matter. |
|
|
binary events. |
|
bounded counts |
successes out of a fixed number of trials. |
|
bounded counts |
over-dispersed binomial counts. |
|
non-negative integers |
count data with mean close to variance. |
|
non-negative integers |
over-dispersed count data. |
|
positive or non-negative waiting count |
trials until success. |
|
positive integers |
rare-species or heavily right-skewed counts. |
|
all integers |
difference of two Poisson counts. |
|
one value |
deterministic fields, constants, or degenerate baselines. |
|
integer support with spike behavior |
integer-valued data with a prominent preferred value. |
Choosing Between Similar Families¶
For real-valued residuals:
start with
GaussianEstimator;use
StudentTEstimatorwhen a few large residuals should not dominate;use
SkewNormalEstimatorwhen positive and negative deviations behave differently;use
LaplaceEstimatorwhen absolute-error-like behavior is more natural than squared-error-like behavior.
For positive durations:
start with
GammaEstimator;use
ExponentialEstimatoras a simple memoryless baseline;use
WeibullEstimatorwhen the hazard changes with age;use
LogGaussianEstimatorwhen multiplicative effects dominate.
For counts:
start with
PoissonEstimator;use
NegativeBinomialEstimatorwhen variance exceeds the mean;use
BetaBinomialEstimatorfor bounded over-dispersed counts;use
SkellamEstimatorwhen the observation is a difference of counts.
For extremes:
use
GeneralizedExtremeValueEstimatorfor block maxima;use
GeneralizedParetoEstimatorfor threshold exceedances;use Analysis Utilities for tail diagnostics before committing to a tail family.
Composition Example¶
Scalar families are often leaves in a larger record model:
from mixle.inference import optimize
from mixle.stats import (
CategoricalEstimator,
CompositeEstimator,
GammaEstimator,
NegativeBinomialEstimator,
)
rows = [
("login", 0.8, 2),
("purchase", 4.2, 5),
("login", 1.1, 1),
]
estimator = CompositeEstimator(
(
CategoricalEstimator(), # event type
GammaEstimator(), # latency
NegativeBinomialEstimator(), # repeated attempts
)
)
model = optimize(rows, estimator, out=None)
The same scalar leaf can appear inside a mixture, HMM emission, survival wrapper, transform, record field, or process model.
Enumeration¶
Finite and countable discrete families may expose enumerators. Use Enumeration and Ranking for top-k and support traversal. Use Operations when a continuous family must be quantized into finite support for downstream enumeration.
API Reference¶
The generated scalar-family modules live under: