Documentation

TauCeti.Probability.Distributions.Categorical.Basic

Categorical distributions #

A probability vector p : Convexity.StdSimplex ℝ≥0 ι determines the categorical law on ι by assigning mass p.weights i to each category i. This file gives the measure-level definition, its singleton masses and finite-sum integration formula, and measurability in the probability vector.

With the coordinate topology on the finite simplex, the categorical law is weakly continuous on the full simplex, including zero weights.

Categorical laws are functorial in the category type: mapping categories along f : ι → κ adds the weights over the fibres of f, exactly as Convexity.StdSimplex.map does. Encoding a category i by the one-hot count vector Pi.single i 1 identifies the categorical law with the one-trial multinomial law. These facts make categorical measures usable as finite mixing laws and connect them to the existing multinomial API.

For labels in a measurable space, measurable-set masses sum the weights over the corresponding fibres, including repeated labels. With measurable singletons, the positive-weight labels form a finite carrying set, each of whose points has nonzero mass. For real labels, the cdf gives the corresponding cumulative sum. Quantile formulas and endpoint limits are in TauCeti.Probability.Distributions.Categorical.Quantile.

Main results #

References #

The categorical law with probability vector p is the corresponding finite weighted sum of Dirac measures.

Instances For

    The categorical law as its defining weighted sum of Dirac measures.

    @[simp]

    The mass of a category under its categorical law is its simplex weight.

    Every probability measure on a finite type with measurable singletons is categorical.

    @[simp]

    The real mass of a category under its categorical law is its simplex weight.

    Integration against a categorical law is the probability-weighted finite sum.

    The categorical law is measurable in its probability vector.

    Categorical laws vary weakly continuously with all their weights, including zero weights.

    A continuous probability vector gives a weakly continuous categorical family.

    @[simp]

    Mapping a categorical law along a map of category types adds weights over its fibres.

    @[simp]

    Encoding a categorical outcome as the one-hot vector Pi.single i 1 gives the multinomial law with one trial.

    The one-hot encoding of a categorical outcome has the one-trial multinomial law.

    The mass of a measurable set of labels is the sum of all category weights with a label in that set. In particular, repeated labels have their weights added.

    A labeled categorical law is carried by the image of its positive-weight categories.

    Every positive-weight label has nonzero mass, even when several categories share it.

    The real mass below a cutoff after assigning real labels to categorical outcomes is the sum of the weights of all categories whose labels lie below that cutoff. Equal labels are therefore aggregated automatically.

    The cdf after assigning real labels to categorical outcomes is the sum of the weights of all categories whose labels are at most the cutoff. Equal labels are aggregated automatically.