Include resampling over (kappa+alpha) and rho=kappa/(kappa+alpha) in WeakLimitStickyHDPHMM#98
Open
NickHoernle wants to merge 2 commits intomattjj:masterfrom
Open
Include resampling over (kappa+alpha) and rho=kappa/(kappa+alpha) in WeakLimitStickyHDPHMM#98NickHoernle wants to merge 2 commits intomattjj:masterfrom
NickHoernle wants to merge 2 commits intomattjj:masterfrom
Conversation
…mma and kappa). The hyperparameters are reparameterised to (kappa+alpha) and rho=kappa/(alpha+kappa). transitions.py the new "FullConcGibbs" classes are included to allow this resampling
…tionary to hold the hyperparameters and the probability value. Possible need for neater update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change follows Algorithm 9 and Appendix C of E. Fox dissertation 2009.
The change reparameterized
alphaandkappaas(alpha+kappa)andrho=kappa/(kappa+alpha). We place a Gamma prior over(alpha+kappa)and a Beta prior overrho. TheWeakLimitStickyHDPHMMclass is updated to allow the new hyper-parameters. Further, the new classes are added to the transitions.py class to include "FullConcGibbs" classes to indicate that we are now sampling over all of the hyper-parameters in the model (rather than just the alpha and gamma parameters as before).I ran the updated model on
example-data.txtfollowing the code inhsmm.py(changing the relevant model to:The result is that we now have a posterior over kappa:

plt.hist([m.trans_distn.kappa for m in models]):I'd very much appreciate it if you have any comments/suggestions/reviews.
Thanks very much