-
Notifications
You must be signed in to change notification settings - Fork 231
Gibbs Conditionals (new PR) #1275
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
Gibbs Conditionals (new PR) #1275
Conversation
I would say this one first since it's "smaller" in that it touches less of the code base. |
(I'll test the rest manually) Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
|
Should be fine now; there's still some issue with variable subsumption, but @trappmartin agreed that I should merge already. I'll make a separate issue. |
|
You forgot to bump the version number - can you fix this in a new PR? 🙂 |
This is just the same as #1172, but I did some bad things with Git there, so creating a new PR seemed easier
Introduces a sampler
GibbsConditionalthat can be used to manually specify a -- surprise! -- Gibbs conditional for a variable:See also this discussion.
where the
cond_vare functions from aNamedTupleof the conditioned variables ((λ,)formand vice versa in the above example) to aDistribution(or probably just aSampleableis enough). Example code.Currently, only one variable per sampler object is handled (as opposed to some other samplers). Of course extension is possible, but I believe it is better to leave it this way and let
Gibbshandle the sweeps.Since this seemed too simple, I'm quite sure there's work left. At least:
assume/observe.) simply copied from MH -- can this be simplified or at least abstracted?Currently, the code is working on the tests when only the conditionals or a combination of conditioals and MH is used, but fails in combination with an HMC sampler due to some AD things I don't understand.