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

Rewrite the Horseshoe Gibbs sampler to use our rewrite system #64

Open
rlouf opened this issue Sep 25, 2022 · 0 comments
Open

Rewrite the Horseshoe Gibbs sampler to use our rewrite system #64

rlouf opened this issue Sep 25, 2022 · 0 comments
Labels
gibbs important mathematical relations miniKanren refactoring A change that improves the codebase but doesn't necessarily introduce a new feature sampler steps

Comments

@rlouf
Copy link
Member

rlouf commented Sep 25, 2022

The Gibbs sampler for the horseshoe prior does not work on the conditional distributions found in the model, but on the conditional distributions of a transformed version of the model.

In particular, it exploits the fact that a half-Cauchy distribution can be intepreted as a mixture of inverse-gamma distributions, and that if $Z \sim \operatorname{InvGamma}(1, a)$ then $Z \sim 1 / \operatorname{Exp}(a)$.

We should instead implement these relations and update construct_samplers so it finds this structure and builds the sampling steps for each variable in the original model expression.

Related to #46, #65

@rlouf rlouf changed the title Rewrite the Horseshoe Gibbs sampler to use our rewrite systems Rewrite the Horseshoe Gibbs sampler to use our rewrite system Sep 25, 2022
@rlouf rlouf added gibbs important miniKanren mathematical relations sampler steps refactoring A change that improves the codebase but doesn't necessarily introduce a new feature labels Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gibbs important mathematical relations miniKanren refactoring A change that improves the codebase but doesn't necessarily introduce a new feature sampler steps
Projects
None yet
Development

No branches or pull requests

1 participant