Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for hierarchical hidden Markov models (not just hierarchical priors on the transitions and observations) #49

Open
r-shruthi11 opened this issue Jul 17, 2019 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@r-shruthi11
Copy link

Hello,
Thanks for creating this package! I was wondering if you could help me with an example to create a hierarchical HMM? I'm looking to have two levels of states - the higher governs the structure of the transitions between the lower states with a simple Gaussian observation model - I was wondering how to instantiate such a model.
Thanks again!
Shruthi

@slinderman slinderman added enhancement New feature or request good first issue Good for newcomers labels Jul 19, 2019
@slinderman slinderman changed the title Example with hierarchical HMM? Add support for hierarchical hidden Markov models (not just hierarchical priors on the transitions and observations) Jul 19, 2019
@slinderman
Copy link
Collaborator

Hi Shruthi,

Thanks for raising this issue. The "hierarchical" extensions are a bit poorly named, unfortunately. They refer to having a hierarchical prior distribution on the observation and/or transition distributions, and they interact with the tag kwarg in the HMM interfaces. For example, in some recent work we used these types of models to capture variability in the observation models from one individual to the next. (Though to be honest, I ended up writing special case code for this purpose, which I still need to merge into the master branch.)

That said, it wouldn't be too hard to put together a simple hierarchical HMM with multiple levels of discrete states. That's something I've wanted to do for a long time. The straightforward implementation is to just expand the state space to make it a cross product of the higher and lower levels, but this would yield suboptimal message passing performance. A proper HHMM message passing algorithm would be a very feature to add. I'll mark this as a feature request for now and hope to get to it asap!

@r-shruthi11
Copy link
Author

Hi Scott,

Thanks for clarifying that! I'm a big fan of your work with the worm data :) Yeah, I think the HHMM feature would be really helpful to model nested processes/actions along multiple timescales. I'll keep an eye out for that feature when you add it!

@mackancurtaincheeks
Copy link

Is this implemented by now? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants