Comments (2)
Hi @bskrainka. To the best of my understanding, the book is using PyMC version 3.11.4 (https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/blob/main/environment.yml), so it should be possible to execute the code with this version.
However, I also went for the most recent PyMC version which was 5.0.2 when I started reading the book and experienced similar issues as you did. I found some workarounds how to execute the code with minimal changes. In particular, the code snippet you refer to should be updated to this:
pred_dists = (pm.sample_prior_predictive(1000, model, var_names=["y_obs"]),
pm.sample_posterior_predictive(idata, model, var_names=["y_obs"]))
Nonetheless, I hope the authors will update the book to make it usable with newer PyMC versions. Found it to be a great source with clear explanations and practical examples.
from bookcode_edition1.
Hey folks, both thank you for the kind words and apologies for the trouble. The book is written in PyMC3, the concepts will be the same for PyMC v5, or any ppl, but the code will not, hence why PyMC is at v5.
We wont be updating the code anytime this year to be frank, but we do expect to write a second edition of this book which will update the code and add additional topics.
You can get hepl from the pymc discourse for api help. Ourselves and a number of the core contributors are active there.
https://discourse.pymc.io/
from bookcode_edition1.
Related Issues (20)
- Missing dataset: 8M10 HOT 8
- More documentation for run_mcmc_simple
- Missing p in equation
- Manuscript Error:
- No install file
- Bayesian Structural Time Series - Code adjusments
- Manuscript Error: Mismatch - Chapter 8 book code to notebook code in rvs function
- Manuscript Error: Code 6.15 vs Equation 6.7 HOT 1
- Issue on page /markdown/chp_11.html (imprecise example of 0 probability)
- Problem to reproduce Figure 1.5 HOT 4
- Type Error on import of Tensorflow Code Block 3.7 Chapter 03 HOT 1
- Manuscript Error: HOT 3
- Manuscript Error:
- Code for Figure 2.7 not working with PYMC5
- Are solutions available to exercises?
- Fix TFP Code
- Solution of question 5M16 BMCP
- Better reference to scientific citation data in Problem 8M9
- Manuscript Error: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bookcode_edition1.