control//state estimation//Bayes filter
The Bayes filter is the general recursive estimator that keeps a probability distribution over the state, the **belief**, and updates it at every step with a prediction through the model and a correction by how likely the new reading is; every practical estimator, from the Kalman filter to the particle filter, is one way of carrying out that update. Today's posterior is tomorrow's prior: each new reading is combined by Bayes' rule with what was already believed, and estimating in real time is that, repeated hundreds of times a second (**recursive Bayesian estimation**).
The Bayes filter is the general recursive estimator that keeps a probability distribution over the state, the belief, and updates it at every step with a prediction through the model and a correction by how likely the new reading is; every practical estimator, from the Kalman filter to the particle filter, is one way of carrying out that update. Today's posterior is tomorrow's prior: each new reading is combined by Bayes' rule with what was already believed, and estimating in real time is that, repeated hundreds of times a second (recursive Bayesian estimation).
b′(s′) ∝ P(y∣s′)∑sP(s′∣s,a) b(s)b'(s')\;\propto\;P(y\mid s')\sum_{s}P(s'\mid s,a)\,b(s)b′(s′)∝P(y∣s′)s∑P(s′∣s,a)b(s)
The sum is the prediction: where the action aaa and the dynamics take each possible state sss, weighted by how much it was believed. P(y∣s′)P(y\mid s')P(y∣s′) is the correction, how likely the reading yyy would be if the state were s′s's′. The proportionality hides a division that makes the new belief b′b'b′ add up to one. The filter never stores the history of readings, only the belief, so its memory and its cost per step stay constant however long it runs.
The update is exact and almost never computable as written. A belief over a continuous state is a whole function, and pushing a function through a nonlinear model and multiplying it by a likelihood has no closed form in general. The estimators differ in how they represent the belief:
With a linear model and Gaussian noise the belief stays a bell, described by a mean and a covariance, and the update is the Kalman filter, exact in five lines (Gaussian assumption). With a curved model the bell is kept by approximation (extended Kalman filter, unscented Kalman filter).
With any shape of belief, including several peaks, it is carried by weighted samples, the particle filter; with a belief close to a few bells, by a bank of Kalman filters (IMM). With a small discrete state (a robot on a coarse grid of cells) it is a table of probabilities updated exactly, a histogram filter.
An agent that cannot see the state decides on its belief, and that belief is what this filter computes (POMDP). In practice most systems estimate and then act as if the estimate were true (certainty equivalence).
It is easy to confuse with two neighbours. Bayesian inference usually updates beliefs about fixed parameters from a whole batch of data, offline; the Bayes filter follows a state that moves, one reading at a time. And filter here means estimator: a digital filter that removes frequencies from a signal is a different object that happens to share the word.