How to marginalized Hidden Markov Model with categorical?

FYI, I implemented the forward algorithm using theano.scan, notebook here: https://github.com/junpenglao/Planet_Sakaar_Data_Science/blob/master/PyMC3QnA/discourse_2230.ipynb

Observation:

  • unsupervised model is super unidentifiable
  • semi-supervised model seems to perform quite well

@nmrobert, do you see similar result in Stan?