15  Discrete latent variables

mixture models and their solutions, because all deep generative models use variational inference, we also gradually build to it.

15.1 K-means clustering

update assignments (E) and centers (M) till convergence

plot of the cost function after each E step (in blue) and M step (in red).

15.1.1 Image segmentation

applying K-means to image segmentation, with varying Ks

15.2 Mixture of Gaussian

graph representation of mixture model (VERY SIMPLE!)

\[ \ln p(\mathbf{X}|\boldsymbol{\pi}, \boldsymbol{\mu}, \boldsymbol{\Sigma}) = \sum_{n=1}^{N} \ln \left\{ \sum_{k=1}^{K} \pi_k \mathcal{N}(\mathbf{x}_n|\boldsymbol{\mu}_k, \boldsymbol{\Sigma}_k) \right\} \]

15.2.1 Likelihood function

15.2.2 Maximum likelihood

15.3 Expectation maximisation

15.3.1 Gaussian mixtures

15.3.2 Relation to K-means

15.3.3 Bernoulli mixtures

15.4 Evidence lower bond

15.4.1 EM revisited

15.4.2 IID data

15.4.3 Parameter priors

15.4.4 Generalised EM

15.4.5 Sequential EM