A mixture with unknown $K$
The topic Gaussian processes put a prior on functions, and the model grew with the data: every new input added a new value to the prior. For clustering we need the same trick one level up, a prior over partitions of the data.
Recall the two-component Gaussian mixture of the topic EM and Bayesian PCA. EM fitted it well, but we had to choose before seeing the data. In practice one fits several and compares them by BIC or by evidence (the topic Bayesian model selection). Can the number of clusters instead be inferred together with everything else, and grow when more data arrive?
The first tool is the Dirichlet distribution, the multi-outcome version of the Beta. A vector on the simplex (, ) has the density
Three facts are enough for this topic:
- the mean is , and with the Dirichlet is exactly ;
- aggregation: merging components adds their parameters, e.g. ;
- conjugacy with categorical labels: after counts the posterior is .
Now a finite Bayesian mixture with symmetric weights:
Here is the base distribution of cluster parameters and the likelihood of one cluster; with Gaussian this is the mixture from EM with priors added. Integrating out gives the posterior predictive of the next label, the posterior mean of :
With and this is the coin from the topic The Bayesian approach: three heads give .