For parsing algorithms in computer science, the inside–outside algorithm is a way of re-estimating production probabilities in a probabilistic context-free grammar. It was introduced by 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).

Inside and outside probabilities

edit

The inside probability is the total probability of generating words , given the root nonterminal and a grammar :[1]

The outside probability is the total probability of beginning with the start symbol and generating the nonterminal and all the words outside , given a grammar :[1]

Computing inside probabilities

edit

Base Case:

General case:

Suppose there is a rule in the grammar, then the probability of generating starting with a subtree rooted at is:

The inside probability is just the sum over all such possible rules:

Computing outside probabilities

edit

Base Case:

Here the start symbol is .

General case:

Suppose there is a rule in the grammar that generates . Then the left contribution of that rule to the outside probability is:

Now suppose there is a rule in the grammar. Then the right contribution of that rule to the outside probability is:

The outside probability is the sum of the left and right contributions over all such rules:

References

edit
  1. ^ a b Manning, Christopher D.; Hinrich Schütze (1999). Foundations of Statistical Natural Language Processing. Cambridge, MA, USA: MIT Press. pp. 388–402. ISBN 0-262-13360-1.
edit

📚 Artikel Terkait di Wikipedia

Point in polygon

point-in-polygon (PIP) problem asks whether a given point in the plane lies inside, outside, or on the boundary of a polygon. It is a special case of point location

Inside Outside

Inside outside may refer to: Inside–outside algorithm, a way of re-estimating production probabilities in a probabilistic context-free grammar Inside/outside

List of artificial intelligence algorithms

difference learning Byte-pair encoding Cocke–Younger–Kasami algorithm Earley parser Inside-outside algorithm Canny edge detector GrabCut RANSAC Scale-invariant

Probabilistic context-free grammar

Markov models extend regular grammars. The Inside-Outside algorithm is an analogue of the Forward-Backward algorithm. It computes the total probability of

CYK algorithm

Cocke–Younger–Kasami algorithm (alternatively called CYK, or CKY) is a parsing algorithm for context-free grammars published by Itiroo Sakai in 1961. The algorithm is named

Expectation–maximization algorithm

prominent instances of the algorithm are the Baum–Welch algorithm for hidden Markov models, and the inside-outside algorithm for unsupervised induction

List of algorithms

performs almost linear time and O(n3) in worst case. Inside-outside algorithm: an O(n3) algorithm for re-estimating production probabilities in probabilistic

Maze-solving algorithm

algorithm is an automated method for solving a maze. The random mouse, wall follower, Pledge, and Trémaux's algorithms are designed to be used inside