Latent variables, HMMs and Kalman filters

The quantity you care about is hidden, changes over time, and shows itself only through noisy readings. Latent-variable models, hidden Markov models with the forward and Viterbi algorithms derived from scratch, Baum–Welch as EM, and the Kalman filter as Bayes' rule applied over and over to Gaussians.

65 min

After this lesson you can

  • Write down a latent-variable model and name the inference and learning problems it poses
  • Define an HMM by its initial distribution, transition matrix and emission matrix, and derive the forward algorithm and the likelihood it computes
  • Derive the Viterbi algorithm as max-product dynamic programming and trace back the most probable path
  • Describe Baum–Welch as EM whose E-step is forward–backward
  • Derive the Kalman filter's predict and update steps from Gaussian conditioning, and explain the gain

In this lesson

  1. Latent variables
  2. Hidden Markov models
  3. The Kalman filter: an HMM with Gaussians
  4. In code

This lesson is part of Descent Pro

Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.

Descent Pro

Start your free trial to keep reading

This lesson, and every other lesson on the route, is part of Descent Pro. Every plan starts with a free trial, and students with a .edu email get longer. Cancel before the trial ends and you pay nothing.