Skip to content

MarSH-Up/Hidden-Markovs-Model_Foward-Algorithm_V1-0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⛰ Hidden Markovs Model's Foward Algorithm

The content of this repository served as an assignment project requested for the course Probabilistic Graphical Models at the INAOE as a student of the Master in Science in Computer Science. All the resources presented in the versions of this code were obtained from the class book that you can find in the references part.

This application of the algorithm and information was for an only educational purpose

Description:

Implement the Forward algorithm for estimating the probability of a sequence of observations given the model. The program should work for any discrete HMM and an observation sequence.

Professor:

Student Involved:

Instructions

  1. Download the repository's file
  2. Verify that the C++ version is at least C++ 14
  3. Call the functions marked in the documentation

Example

To run in you would need 3 statements:

  1. Prior Probability Vector
  2. Transition Matrix
  3. Observation Matrix
  4. Sequences to look.
  • The matrixes follow the next structure:
  1. Prior Probability Vector: It's basically an array: π = S0,S1,S2, ..., S10

    • The number of accepted states can be improved by modifying the px variable, right now delimited to 10 possibles states, Sn.
  2. Transition Matrix: represents the cost of the transition between states.

  3. Observation Matrix: represent the probability for each state to reach the given "status" The next image shows a basic example taken from the referenced book with the following information:

  • example
  • Sequence HHTT
  • Console example

#References

  • Sucar, L. E. (2020). Probabilistic graphical models. Advances in Computer Vision and Pattern Recognition.London: Springer London. doi, 10(978), 2

About

Probabilistic Graphical Model method for HMMs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages