AI engineering glossary · NLP embeddings
What is viterbi algorithm?
Viterbi algorithm (also called Viterbi decoding): A dynamic-programming method that finds the single most probable sequence of hidden states for an observed sequence, by keeping only the best path into each state at every step. Its cost grows linearly with length and with the square of the number of states.
Viterbi algorithm: an example
With 3 tags and 5 words, Viterbi evaluates about 5 x 3 x 3 = 45 transitions instead of 3^5 = 243 full sequences.
Related terms
More NLP embeddings terms
- Vocabulary
- Vocabulary size
- Word analogy
- Word embedding
- Word sense disambiguation
- Word tokenisation
- Word2Vec
- WordPiece
Where you learn it
Viterbi algorithm is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.