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

Compute only dependent logp in step samplers #7591

Open
ricardoV94 opened this issue Nov 26, 2024 · 0 comments
Open

Compute only dependent logp in step samplers #7591

ricardoV94 opened this issue Nov 26, 2024 · 0 comments

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Nov 26, 2024

Description

As discussed in: https://discourse.pymc.io/t/semantik-description-of-kruschke-diagrams-model-to-graphviz/16142/8 we could be making more use of the conditional partition of the logp graph for partial step samplers.

When the proposal depends on a ratio between probabilities (BinaryMetropolois, BinaryGibbsMetropolis, CategoricalGibbsMetropolis, Slice, NUTS), we don't need to compute terms that don't depend on the updated variables.

Step samples that explicitly request delta_logp (Metropolis, DEMetropolis) achieve this implicitly via PyTensor rewrites.

I suggest adding a model.dependent_logp(vars) that helps us get the logp we need (the variables of interest + conditional dependent variables)

@ricardoV94 ricardoV94 changed the title Compute only markov blanket logp in step samplers Compute only dependent logp in step samplers Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant