 Forward–backward algorithm

The forward–backward algorithm is an inference algorithm for hidden Markov models which computes the posterior marginals of all hidden state variables given a sequence of observations/emissions formula_1, i.e.it computes, for all hidden state variables formula_2, the distribution formula_3.