Code covered by the BSD License  

Highlights from
Viterbi algorithm (Belief propagation) for HMM MAP inference

3.0 | 1 rating Rate this file 13 Downloads (last 30 days) File Size: 1.69 KB File ID: #35253 Version: 1.2
image thumbnail

Viterbi algorithm (Belief propagation) for HMM MAP inference


Mo Chen (view profile)


24 Feb 2012 (Updated )

Viterbi algorithm (Belief propagation for directed graphical model) for HMM MAP inference

| Watch this File

File Information

Viterbi algorithm based on the Python code found at:

An example based on the one from the Wikipedia page is also included.

This algorithm is equivalent to the max-product belief propagation on a chain graphical model.

The code is carefully tuned. It is fully vectorized. All unnecessary for loops are replaced by vector operations. Also logarithm trick is used to prevent numeric underflow which often happens in probability computation.

MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
15 Apr 2014 shahin anjum  
25 Feb 2012 1.1

update description

25 Sep 2013 1.2

correct title

Contact us