Skip to content

An implementation of the Viterbi Algorithm for training Hidden Markov Models. Fifth Assignment for Probabilistic Models for Decisions course @unimib18/19.

License

Notifications You must be signed in to change notification settings

GiorgiaAuroraAdorni/viterbi-algorithm-for-hmm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Viterbi Algorithm for Hidden Markov Models

A MATLAB implementation of the Viterbi Algorithm for training Hidden Markov Models.

Fifth Assignment for Probabilistic Models for Decisions course @ Unimib 18/19.

Example

Consider the following HMM:

  • Initial probability distribution (for example states: climb, not climb)

  • Transition probability matrix (again states: climb, not climb)

    This is the rendered form of the equation. You can not edit this directly. Right click will give you the option to save the image, and in most browsers you can drag the image onto your desktop or another program.

  • Emission probability matrix (for example observations: injury, not injury)

Given a sequence of observation, for example E = {not injury, injury, not injury}, this implementation of the Viterbi algorithm computes the most probable state sequence and the best sequence probability, that is the likelihood of the path.

For the given HMM the algorithm returns:

  • the best sequence probability :

    not injury injury not injury
    climb 0.1960 0.0627 0.0050
    not climb 0.0180 0.0118 0.0339
  • the most probable state sequence :

    climb, climb, not climb
    

About

An implementation of the Viterbi Algorithm for training Hidden Markov Models. Fifth Assignment for Probabilistic Models for Decisions course @unimib18/19.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages