Structured Statistical Families¶
This page covers distribution families whose observations are not scalar: records, tuples, sequences, sets, rankings, trees, graphs, vectors, matrices, and directional data. These are the families that make Mixle useful for heterogeneous data rather than only iid columns.
Combinators¶
Combinators turn smaller distributions into distributions over structured observations.
Family |
Observation shape |
Use when |
|---|---|---|
|
tuple |
fields are ordered by position. |
|
named record |
fields are dictionaries or schema-backed records. |
|
dictionary record |
dictionary shape should be explicit. |
|
variable-length sequence |
elements share a family and length may be modeled. |
|
missing-or-present value |
a field can be absent without dropping the whole record. |
|
dispatch by type or field |
different subfamilies apply to different observed cases. |
|
conditional relation |
a distribution depends on observed covariates. |
|
deterministic transformed value |
modeling scale differs from observation scale. |
|
stochastic finite mapping |
a latent finite source emits through a finite channel. |
|
restricted support |
legal or observed support is a subset of the base family. |
|
censored observation |
true value is partially hidden by thresholds or intervals. |
|
event or censoring time |
time-to-event data with censoring. |
|
structural zero plus positive part |
zero occurrence and positive magnitude are separate processes. |
|
extra zeros |
count data have more zeros than the base family explains. |
|
weighted observation |
examples carry frequency or importance weights. |
|
ignored field |
a field must pass through shape validation but not affect likelihood. |
|
no information |
neutral branch in a larger composition. |
Combinators are how a heterogeneous row becomes one model:
from mixle.inference import optimize
from mixle.stats import CategoricalEstimator, GammaEstimator, RecordEstimator, field
estimator = RecordEstimator(
(
field("event", CategoricalEstimator()),
field("duration", GammaEstimator()),
)
)
model = optimize(records, estimator, out=None)
Multivariate And Matrix Families¶
Family |
Observation |
Use when |
|---|---|---|
|
real vector |
full-covariance Gaussian vector model. |
|
real vector |
independent Gaussian dimensions or high-dimensional baseline. |
|
real vector |
heavy-tailed vector residuals. |
|
vector with copula dependence |
separate marginal behavior from Gaussian dependence. |
|
compositional vector |
parts constrained to a whole. |
|
finite-count vector |
category counts from repeated trials. |
|
integer-count vector |
dense integer-coded multinomial counts. |
|
count vector |
over-dispersed multinomial counts. |
|
matrix |
row/column covariance structure. |
|
positive-definite matrix |
covariance-like random matrices. |
|
positive-definite matrix |
inverse covariance or Bayesian covariance prior. |
|
correlation matrix |
correlation priors or fitted correlation structure. |
For full-covariance multivariate Gaussian fits, 0.6.2 improves the default numeric path in two ways. Weighted second moments are accumulated through a BLAS-backed matrix multiply instead of a naive tensor contraction, which keeps large mixture fits from spending most of their time in covariance assembly. The Cholesky path also has a minimal jitter fallback for nearly positive-definite float32 covariance estimates, so GPU or reduced-precision EM runs can recover from roundoff without changing the ordinary float64 fast path.
Directional Families¶
Directional observations live on circles, spheres, or orientation manifolds.
Family |
Support |
Use when |
|---|---|---|
|
circle |
circular angles. |
|
circle |
wrapped Gaussian-like angular data. |
|
circle |
heavier-tailed circular data. |
|
sphere |
directional vectors around a mean direction. |
|
axial sphere |
orientations where sign is not meaningful. |
|
sphere |
directional data with elliptical concentration. |
|
antipodal directional support |
axial orientation and shape. |
|
sphere/circle |
directions induced by projecting Gaussian vectors. |
Sequences And Markov Families¶
The sequence package covers explicit Markov structure over observed states:
MarkovChainDistributionandMarkovChainEstimator;IntegerMarkovChainDistributionandIntegerMarkovChainEstimator;MarkovTransformandSparseMarkovTransformfamilies.
Use these when the observation is an observed-state sequence. Use HMMs and Latent Structure when the state path is hidden.
Sets¶
Set families model unordered finite collections:
BernoulliSetDistributionandBernoulliSetEstimator;IntegerBernoulliSetDistributionandIntegerBernoulliSetEstimator;IntegerBernoulliEditDistributionandIntegerBernoulliEditEstimator;IntegerStepBernoulliEditDistributionandIntegerStepBernoulliEditEstimator.
Use set families when membership matters but order does not. Use edit families when the likelihood is naturally expressed as set changes from a reference.
Rankings And Pairwise Preferences¶
Ranking families model permutations, partial orderings, or pairwise outcomes:
MallowsDistributionandMallowsEstimator;GeneralizedMallowsDistributionandGeneralizedMallowsEstimator;GeneralizedMallowsModelDistributionandGeneralizedMallowsModelEstimator;PlackettLuceDistributionandPlackettLuceEstimator;SpearmanRankingDistributionandSpearmanRankingEstimator;BradleyTerryDistributionandBradleyTerryEstimator;ThurstoneDistributionandThurstoneEstimator;ThurstoneMostellerDistributionandThurstoneMostellerEstimator;DavidsonDistributionandDavidsonEstimator;RaoKupperDistributionandRaoKupperEstimator;LowRankPermutationDistributionandLowRankPermutationEstimator;EwensDistributionandEwensEstimator;MatchingDistributionandMatchingEstimator.
Use these for preference data, rankings, pairwise comparison, matching, or ordering uncertainty. For consensus analysis outside a distribution family, see Analysis Utilities.
Trees And Graphs¶
Tree and graph families score structured graph-valued observations:
ChowLiuTreeDistributionandChowLiuTreeEstimator;IntegerChowLiuTreeDistributionandIntegerChowLiuTreeEstimator;SpanningTreeDistributionandSpanningTreeEstimator;ErdosRenyiGraphDistributionandErdosRenyiGraphEstimator;StochasticBlockGraphDistributionandStochasticBlockGraphEstimator;RandomDotProductGraphDistributionandRandomDotProductGraphEstimator;KnowledgeGraphDistributionandKnowledgeGraphEstimator;KnowledgeGraphEnsembleandfit_knowledge_graph_ensemble;temporal graph grammar families including
TemporalGraphGrammarDistributionand labeled, homophily, churning, latent, attributed, and latent-churning variants.
Use graph distributions when the graph itself is the observation. Use Relations when a graph algorithm is the decision layer after a model has produced edge or node scores.
Workflow¶
The safest workflow for structured families is:
Start with the simplest shape-preserving family.
Fit locally on a representative sample.
Inspect field-level or component-level likelihoods.
Add latent structure only when held-out scoring supports it.
Add enumeration, relation, or production constraints only after the probabilistic model is behaving sensibly.
API Reference¶
Generated reference pages: