{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# The EM Algorithm\n", "\n", "The expectation-maximization algorithm is an iterative approach to find a (local) maximum of the likelihood that can be computationally much more tractable than directly maximizing the likelihood.\n", "\n", "It is particularly useful in problems that have missing data or latent (unobserved) variables.\n", "\n", "It is in a general class of optimization algorithms that alternate between two types of operations, constructing or estimating something, and maximizing or minimizing something." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We observe data $(X, Y) \\sim {\\mathbb P}_\\theta$, where $\\{{\\mathbb P}_\\theta : \\theta \\in \\Theta\\}$ is a known parametric family of probability distributions, but the particular value of $\\theta$ is unknown.\n", "\n", "We want to estimate $\\theta$ using maximum likelihood, that is, to find\n", "\n", "$$\n", " \\hat{\\theta} \\in \\arg \\max_{\\eta \\in \\Theta} {\\mathbb P}_\\eta (X,Y).\n", "$$\n", "\n", "It's common to work with the log likelihood; since the logarithm is a monotonic function, the value of $\\eta$ that maximizes the log likelihood is the same as the value that maximizes the likelihood:\n", "\n", "$$\n", " \\hat{\\theta} \\in \\arg \\max_{\\eta \\in \\Theta} \\ln {\\mathbb P}_\\eta (X,Y) = \\arg \\max_{\\eta \\in \\Theta} L(\\eta).\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The EM Algorithm\n", "\n", "