# Discrete HMM Reading List

**URL:** <https://community.intuitivebayes.com/t/discrete-hmm-reading-list/945>\
**Category:** HMMs\
**Created:** [February 9, 2023, 4:52am UTC](https://community.intuitivebayes.com/t/discrete-hmm-reading-list/945 "2023-02-09T04:52:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RavinKumar](https://yyz1.discourse-cdn.com/flex007/user_avatar/community.intuitivebayes.com/ravinkumar/32/13_2.png) [@RavinKumar](https://community.intuitivebayes.com/u/RavinKumar)\
**Post date:** [February 9, 2023, 4:52am UTC](https://community.intuitivebayes.com/t/discrete-hmm-reading-list/945/1 "2023-02-09T04:52:08Z")

</div>

Hey folks  
For the next session we will be focusing on Discrete HMMs. The next session will be live session will be on **Sunday the 25th**

Our goal is to fully understand this formula

\begin{align} p(y\_{1:T}, z\_{1:T} \mid \theta) &= \mathrm{Cat}(z\_1 \mid \pi) \prod\_{t=2}^T \mathrm{Cat}(z\_t \mid A\_{z\_{t-1}}) \prod\_{t=1}^T \mathrm{Cat}(y\_t \mid B\_{z\_t}) \end{align}

We’ll do that with the following reading material

- Casino HMMs from Dynamax
  - [Casino HMM: Inference (state estimation)](https://probml.github.io/dynamax/notebooks/hmm/casino_hmm_inference.html)
  - [Casino HMM: Learning (parameter estimation)](https://probml.github.io/dynamax/notebooks/hmm/casino_hmm_learning.html)

- Complete reading of [Exploring Hidden Markov Models](https://nipunbatra.github.io/hmm/)

Focus on

- Filtering (forwards algorithm)
- Smoothing (forwards-backwards algorithm)
- Most likely state sequence (Viterbi algorithm)

As always this is just my prior. If you have opinions or suggestions please do leave them below!

---

<div class="post-metadata">

**Author:** ![nrakocz](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@nrakocz](https://community.intuitivebayes.com/u/nrakocz)\
**Post date:** [March 2, 2023, 12:19am UTC](https://community.intuitivebayes.com/t/discrete-hmm-reading-list/945/2 "2023-03-02T00:19:21Z")

</div>

After about 40 minutes in session 2, @RavinKumar mentions that many times one line of a mathematical equation is transferred into four lines of code.

In this case, it is due to the log-sum-exp trick that is mostly used for numerical stability.  
Here’s a link that describes why and how it is used: [The Log-Sum-Exp Trick](https://gregorygundersen.com/blog/2020/02/09/log-sum-exp/)

---

<div class="post-metadata">

**Author:** ![RavinKumar](https://yyz1.discourse-cdn.com/flex007/user_avatar/community.intuitivebayes.com/ravinkumar/32/13_2.png) [@RavinKumar](https://community.intuitivebayes.com/u/RavinKumar)\
**Post date:** [March 2, 2023, 1:45am UTC](https://community.intuitivebayes.com/t/discrete-hmm-reading-list/945/3 "2023-03-02T01:45:15Z")

</div>

This is great. Thank you for sharing!
