In computer science, the inside–outside algorithm is a way of re-estimating production probabilities in a probabilistic context-free grammar. It was introduced James K. Baker in 1979 as a generalization of the forward–backward algorithm for parameter estimation on hidden Markov models to stochastic context-free grammars. It is used to compute expectations, for example as part of the expectation–maximization algorithm (an unsupervised learning algorithm).
Contents
Inside and outside probabilities
The inside probability
The outside probability
Computing Inside probabilities
Base Case:
General Case:
Suppose there is a rule
The inside probability
Computing Outside probabilities
Base Case:
Here the start symbol is