Latent variables and mixtures
In the topic The Laplace approximation and Bayesian classification we found the mode of a posterior by Newton's method and put a Gaussian there. That worked because the log-posterior was a sum of simple terms. Now each object gets a hidden part that we never observe, and even finding the mode becomes hard.
A latent variable is a quantity attached to the object that the model uses but the data do not contain. The classic example is a mixture of Gaussians. Each point first picks a component with probability , then is drawn from that component:
The parameters are . We observe only , so the likelihood sums the latent variable out:
The logarithm sits outside the inner sum. Setting the gradient to zero couples all components at once, and there is no closed-form solution.
Compare this with the complete-data log-likelihood, the one we would have if the labels were known:
Here the logarithm acts on single terms, and the problem splits into one small Gaussian fit per component. EM exploits exactly this: we do not know , but for given we know its posterior, and we can average the easy complete-data log-likelihood over it.
Running example. Seven points on a line,
and a mixture of two components with unit variances:
Here is the weight of the first component, not . We start from , where . Later topics of the course return to this mixture.