Skip to content

Conversation

fritzo
Copy link
Member

@fritzo fritzo commented Mar 21, 2022

Inspired by a forum question whose answer would have been easier if we had implemented DiscreteHMM.sample() for generating data. In addition, Bayesian workflow recommends sanity checking models by generating data. We already have .rsample() methods for GaussianHMM and LinearHMM.

Tested

  • added lots of shape tests
  • added a simple test of distribution

Copy link
Collaborator

@martinjankowiak martinjankowiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally looks good but this sample method is non-parallel in contrast to all (?) other *HMM code. should at least comment in the docstring, which purports to parallelize over time?

@martinjankowiak martinjankowiak merged commit 8ac6c46 into dev Mar 22, 2022
@martinjankowiak martinjankowiak deleted the discrete-hmm-sample branch March 22, 2022 12:01
@fritzo
Copy link
Member Author

fritzo commented Mar 22, 2022

Thanks for reviewing @martinjankowiak!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants