Why Measure Allocation Uncertainty?
A fitted mixture model gives each observation a posterior probability of belonging to each component. The largest of these probabilities determines a maximum-posterior assignment, but that label alone does not say how decisive the assignment was. An observation with probabilities \(0.51\) and \(0.49\) receives the same assigned label as one with probabilities \(0.99\) and \(0.01\), even though the evidence for the two labels is very different.
Allocation entropy summarizes the full posterior probability vector for one observation. It is small when nearly all posterior probability is concentrated on one component and large when probability is spread across several components. Its value can be examined observation by observation and then summarized within each fitted cluster. It is a diagnostic of classification uncertainty, not by itself a test of whether the clustering model is adequate or whether its components represent meaningful groups.
Definition and Scale
Suppose a fitted model has \(G\) components. For observation \(i\), let \(\tau_{ig}\) be its posterior probability of allocation to component \(g\), conditional on its observed data and the fitted model. Thus \(\tau_{ig}\geq 0\) and \(\sum_{g=1}^G\tau_{ig}=1\). We use the convention \(0\log 0=0\) and natural logarithms.
The unnormalized scale runs from \(0\) to \(\log G\). Normalization places the value between \(0\) and \(1\), which can make results easier to compare across models with different numbers of components. A normalized entropy is still a measure of uncertainty in the fitted posterior allocations; it does not remove differences in model specification or data.
Worked Example: Comparing Two Two-Component Assignments
Suppose two observations have posterior allocation vectors \((0.75,0.25)\) and \((0.95,0.05)\). Calculate their entropies and interpret them.
For the first observation, $$ e_1=-0.75\log(0.75)-0.25\log(0.25) =0.215761554+0.346573590 \approx 0.562335145. $$
For the second, $$ e_2=-0.95\log(0.95)-0.05\log(0.05) \approx 0.048728630+0.149786614 \approx 0.198515243. $$
The maximum possible entropy for two components is \(\log 2\approx0.693147181\). The normalized values are \(0.562335145/\log 2\approx0.811278\) and \(0.198515243/\log 2\approx0.286397\). Both observations are assigned to component 1 by the maximum-posterior rule, but the first has substantially more allocation uncertainty.
Bounds and Their Meaning
Proof. Since \(0\leq p_g\leq1\), each nonzero term \(-p_g\log p_g\) is nonnegative. Hence \(H\geq0\). A term is zero for \(p_g=1\), and for \(p_g=0\) by convention. The sum is zero exactly when every positive probability equals \(1\), which is precisely a point mass.
For the upper bound, let \(S=\{g:p_g>0\}\), and compare \(p\) with the uniform probability vector \(q_g=1/G\). The inequality \(\log x\leq x-1\) for \(x>0\) gives $$ \sum_{g\in S}p_g\log\left(\frac{q_g}{p_g}\right) \leq \sum_{g\in S}p_g\left(\frac{q_g}{p_g}-1\right) =\frac{|S|}{G}-1\leq0. $$ Therefore \(\sum_{g\in S}p_g\log(p_g/q_g)\geq0\). Since \(q_g=1/G\), this is \(\log G-H\geq0\), so \(H\leq\log G\). Equality requires equality in both inequalities: all \(G\) probabilities must be positive, and \(q_g/p_g=1\) for every \(g\). Thus \(p_g=1/G\) for all \(g\). This proves the bounds and equality cases. \(\square\)
Worked Example: Entropy With Three Components
An observation has posterior probabilities \((0.8,0.1,0.1)\). Its entropy is $$ e=-0.8\log(0.8)-0.1\log(0.1)-0.1\log(0.1) =0.178514841+2(0.230258509) \approx0.639031860. $$
With three components, the maximum is \(\log3\approx1.098612289\), attained at \((1/3,1/3,1/3)\). The normalized entropy here is \(0.639031860/\log3\approx0.581672\). The largest posterior probability is \(0.8\), so the observation has a clear leading component, but its entropy is not close to zero: the remaining \(0.2\) probability is divided across the other two components. Entropy records the whole allocation vector rather than only its largest entry.
Summarizing Entropy Within Clusters
Observation-level entropies can be inspected directly or summarized for each component. A useful posterior-weighted summary assigns each observation's entropy fractionally to every component in proportion to its posterior membership. Define the fitted posterior weight of component \(g\) by \(\hat{\pi}_g=n^{-1}\sum_{i=1}^n\tau_{ig}\), and its posterior-weighted mean entropy by $$ \bar e_g=\frac{\sum_{i=1}^n\tau_{ig}e_i}{\sum_{i=1}^n\tau_{ig}}, $$ provided \(\sum_i\tau_{ig}>0\). These are descriptive summaries of the fitted allocations. The weighting avoids making a hard assignment before summarizing uncertainty; an observation can contribute to more than one component.
One may also report the mean entropy among observations assigned to component \(g\) by the maximum-posterior rule. That summary answers a different question: it describes uncertainty in the subset given a particular hard label. State which convention is being used, especially when observations near assignment boundaries are important.
Derivation. By definition, \(\hat{\pi}_g=(1/n)\sum_i\tau_{ig}\), so $$ \sum_{g=1}^G\hat{\pi}_g\bar e_g =\sum_{g=1}^G\left(\frac{1}{n}\sum_{i=1}^n\tau_{ig}\right) \frac{\sum_{j=1}^n\tau_{jg}e_j}{\sum_{j=1}^n\tau_{jg}} =\frac{1}{n}\sum_{g=1}^G\sum_{j=1}^n\tau_{jg}e_j =\frac{1}{n}\sum_{j=1}^n e_j\sum_{g=1}^G\tau_{jg} =\frac{1}{n}\sum_{j=1}^n e_j. $$ The final equality uses \(\sum_g\tau_{jg}=1\) for every observation \(j\). \(\square\)
Worked Example: Comparing Posterior-Weighted Cluster Entropies
Consider four observations in a two-component fit, with posterior probabilities for component 1 given by \(0.9, 0.8, 0.55,\) and \(0.2\), respectively. The component 2 probabilities are their complements. The observation entropies are approximately \(0.325083, 0.500402, 0.688139,\) and \(0.500402\).
The total posterior weight for component 1 is \(0.9+0.8+0.55+0.2=2.45\). Its weighted entropy numerator is $$ 0.9(0.325083)+0.8(0.500402)+0.55(0.688139)+0.2(0.500402) \approx1.171453. $$ Thus \(\bar e_1\approx1.171453/2.45=0.478144\).
The component 2 weight is \(0.1+0.2+0.45+0.8=1.55\), and its weighted numerator is $$ 0.1(0.325083)+0.2(0.500402)+0.45(0.688139)+0.8(0.500402) \approx0.842573. $$ Therefore \(\bar e_2\approx0.842573/1.55=0.543596\). The fitted proportions are \(\hat{\pi}_1=2.45/4=0.6125\) and \(\hat{\pi}_2=1.55/4=0.3875\). Their weighted average is approximately $$ 0.6125(0.478144)+0.3875(0.543596)=0.503507, $$ which agrees, up to rounding, with the overall mean \((0.325083+0.500402+0.688139+0.500402)/4=0.503507\). In this example the posterior-weighted summary is higher for component 2, but the difference should be read as a descriptive comparison, not as evidence about why the allocations are uncertain.
Reading the Distribution, Not Just the Mean
A mean entropy can hide the pattern that matters for classification. A modest overall mean might arise because almost all observations have decisive allocations while a small group is highly uncertain. Conversely, a moderately high mean could reflect diffuse uncertainty across most observations. Examine the range or quantiles, a histogram or other distributional display, and the identities or characteristics of observations with the largest entropies. Within-cluster summaries can help locate where uncertainty is concentrated.
For a fitted model, the distribution of \(e_i\) describes the observed pattern of uncertainty under that model. A high value signals that the posterior allocation is spread across components for that observation; a low value signals concentration. Neither value alone establishes that the fitted component assignments are correct. The calculation is conditional on the fitted model and its estimated parameters.
Worked Example: A Mean Can Conceal Ambiguous Cases
Suppose two observations in a two-component fit have allocation vectors \((0.99,0.01)\) and \((0.01,0.99)\). Each has entropy $$ -0.99\log(0.99)-0.01\log(0.01)\approx0.056002, $$ so their mean observation entropy is about \(0.056002\), indicating decisive individual allocations. But the average posterior vector is \((0.5,0.5)\), whose entropy is \(\log2\approx0.693147\).
These two quantities answer different questions. The mean of the observation entropies describes uncertainty for a typical observation in this pair. The entropy of the average posterior vector describes how balanced the pooled component probabilities are. In this example the two observations are each assigned decisively, but to opposite components. Substituting one quantity for the other would give a misleading description of the assignments.
Common Mistakes
- Interpreting the maximum-posterior label as a certainty measure. Two observations can have the same assigned label but very different entropies. Retain the full posterior vector when quantifying uncertainty.
- Comparing raw entropies across different values of \(G\) without context. The maximum is \(\log G\), so report the number of components and consider normalized entropy when a relative scale is useful.
- Calling a high entropy a wrong assignment. Entropy indicates diffuse fitted allocation probabilities, not whether a label is objectively incorrect or whether the model fits well.
- Taking entropy after averaging posterior probabilities. Entropy of the average vector is generally not the average observation entropy; the two summaries answer different questions.
- Reporting a cluster summary without defining its membership rule. Posterior-weighted and hard-assignment summaries need not agree, so specify the weighting convention.
Check Your Understanding
Work through these questions using natural logarithms and the convention \(0\log0=0\).
- What are the entropy and normalized entropy of the posterior vector \((0.5,0.5)\) in a two-component model?
- Why can two observations with the same maximum-posterior assignment have quite different allocation entropies?
- For a three-component model, state the smallest and largest possible observation entropy and the posterior vectors attaining them.
- Explain how a posterior-weighted component mean entropy differs from a mean among hard-assigned observations.
- For the two posterior vectors \((0.99,0.01)\) and \((0.01,0.99)\), explain why the entropy of their average is not the mean of their entropies.