-
-
Notifications
You must be signed in to change notification settings - Fork 983
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
[FR] MCMC.marginal() doesn't return joint marginals. #1727
Comments
Currently, the That said, this is definitely far from ideal behavior, and we are yet to finalize on a good design for these classes. One design choice could be as follows:
If you have some ideas on improving the current design, we would love to hear your thoughts! In the meantime, we can probably do a better job of documenting these restrictions. |
For now, it's easy enough to aggregate the values at the sites of interest manually from the joint posterior samples stored in In the long run, maybe rather than collecting the values into a new distribution, what we'd want is to have |
I am closing this issue. The MCMCMarginals class is deprecated and the MCMC interface would return a dictionary of samples from the latent sites directly. These can then be combined by the user, stored in |
I am confused about how to convert an MCMC run into an empirical distribution for multiple parameters. I would've thought
MCMC.marginal()
is the way to get this distribution, but theMCMCMarginals
it returns does not allow sampling from joint distributions. Consider the following model and MCMC run:I want to sample from the MCMC posterior for
x
andy
. Runningmcmc_run.marginal(["x", "y"])
gives me anMCMCMarginals
object forx
andy
, but I can only sample from the empirical distributions forx
andy
separately:This is confusing to me since the
MCMCMarginals
/Marginals
object can take multiple sites as an argument.I would instead expect
Marginals
to wrap a call toEmpiricalMarginal(trace_posterior=mcmc_run, sites=["x", "y"])
. Or am I misunderstanding the point ofMCMCMarginals
/Marginals
?The text was updated successfully, but these errors were encountered: