I'm having problems with the code I'm running in tutorial:
https://bookdown.org/robertness/causalml/docs/tutorial-on-deep-probabilitic-modeling-with-pyro.html
codes:

error:

thanks for any help!
For any bugs, please provide the following:
@lwgkzl The API of MCMC has changed since that tutorial is written. To get posterior samples, you can use
mcmc = MCMC(...)
mcmc.run(...)
posterior = mcmc.get_samples()
@lwgkzl The API of MCMC has changed since that tutorial is written. To get posterior samples, you can use
mcmc = MCMC(...) mcmc.run(...) posterior = mcmc.get_samples()
Many thanks : )
@lwgkzl The API of MCMC has changed since that tutorial is written. To get posterior samples, you can use
mcmc = MCMC(...) mcmc.run(...) posterior = mcmc.get_samples()After this line of code is runοΌ
samples_posterior = mcmc.get_samples()
The type of variablesamples_posterioris still notTracePosterior, so when i run the code:
marginal = EmpiricalMarginal(samples_posterior , "weight")
The error still exists, did I not understand what you meant?
Hi @lwgkzl, you don't need to use EmpiricalMarginal to plot histogram. You can plot samples in samples_posterior directly.
Hi @lwgkzl, you don't need to use
EmpiricalMarginalto plot histogram. You can plot samples insamples_posteriordirectly.
γγγγ¨γγγγγΎγγ
Most helpful comment
γγγγ¨γγγγγΎγγ