
where \(\pi (c\mid \mathbf {X})\)  is the posterior distribution of clustering \(c\) .
Often considered in the literature, the posterior mode is an example of such a Bayesian estimator, based on the very crude 0-1 loss function.
When \(n\)  is large, an MCMC sample from the posterior generally hardly visits twice the same clustering, thus rendering the empirical mode of the MCMC output very sensitive to the initialisation of the chain and of very limited validity in practice.
Manifestly, many other loss functions can be considered and expected to perform better than the 0-1 loss.
One particular choice of a loss function stands out from these in best estimating the number of groups in a clustering.
It is called the variation of information, denoted by \(\mathcal {VI} \) , which is a loss function firmly established in information theory [1]}, [2]}.
The variation of information between two clusterings is defined as the sum of their information (their Shannon entropies) minus twice the information they share.
Simulations indicate that the variation of information is a sensible choice: when other losses such as the Binder loss [3]} typically tend to overestimate the number of clusters, the variation of information instead seems to consistently recover it (see for instance the simulated examples, and more specifically Figures 6 to 8, of [2]}).
