Comments (8)
from bap3.
pz stands for preliz. Usually all imports are in the first cell of each notebook. You will see the line "import preliz as pz".
What error are you getting?
from bap3.
Thank you very much for your quick reply. I didn't see the import code in the book itself, but now that I go to the code in the github I can see it. That addresses my main error - now I just need to figure out how to use the bap3 environment in a Jupyter notebook but I can figure that out! Thanks again.
from bap3.
On Linux or Mac you run "conda activate bap3" from a terminal and then run "jupyter notebook". Not sure on Windows, but I think you can run the same commands if you first find and run the "Anaconda prompt" from the start menu.
Some IDES support notebooks. For instance VsCode supports notebooks (after installing a python plugin).
from bap3.
Thank you so much. That worked. I am self-taught and have previously only used terminal to run my python programs (not Jupyter) so just learning something new. Thanks for all your hard work on this.
from bap3.
Hi Osvaldo, sorry to bother you again. I am on Chapter 2 and tried to create my first model using the code:
with pm.Model() as our_first_model:
theta = pm.Beta('theta', alpha=1., beta=1.) # Specifies the prior
y = pm.Bernoulli('y', p=theta, observed=data) # Specifies the likelihood
idata = pm.sample(1000)
I have the right imports. I am getting a litany of errors (pages of messages) starting with this:
WARNING (pytensor.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
You can find the C code in this temporary file: /var/folders/mf/bvt1s84s18b36l4wbn86s2lc0000gn/T/pytensor_compilation_error_fosqurhy
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: DropDims{axis=0}([4])
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
File "/opt/anaconda3/envs/bap3/lib/python3.11/site-packages/pytensor/graph/rewriting/basic.py", line 1922, in process_node
replacements = node_rewriter.transform(fgraph, node)
There are pages and pages of error notices with "7 errors generated" at the bottom. I'm really stuck after doing some more Googling and can't seem to figure out why I can't run the code. I have activated the bap3 environment in conda.
Is it possible I made errors while installing packages (using pip initially then moving to conda install)? And if so, how do I fix this?
Again, appreciate your time if you have a moment to help.
from bap3.
yeah, it seems you made a mistake while installing packages. You can try deleting the env and starting fresh. Or uninstalling pymc and pytensor, and installing them again. Just to be sure attempt to uninstall the packages using both pip and conda.
from bap3.
from bap3.
Related Issues (20)
- Why is coinflip likelihood a Bernoulli in Chapter 2 when it was a Binomial in Chapter 1? HOT 2
- Fig 3.6
- Pg 105 typo HOT 1
- pg 133 "model interactions" HOT 2
- pg 194-195
- pg 254 wrong Greek letter for inverse link function
- Code 1.2 pz.BetaBinomial: AttributeError: module 'preliz' has no attribute 'BetaBinomial' HOT 6
- Minor typo on page 62
- Kurtosis on page 23, third edition HOT 1
- Typo? Page 82/ Code Block 2.27: Normal -> Gamma HOT 1
- Incorrect Statement? Pg 94, commenting on Code 3.1/ 3.2
- Minor typo pg 115 - need space between "use" and "temperature" HOT 5
- Pg. 124, "a few bulk points"? HOT 2
- Estimating difference in ARPU (using knowledges of chapter 2) HOT 1
- Typo page 34 HOT 1
- Chapter 1 ex 7, unclear & preliz "error" in solution HOT 1
- hierarchical model
- Error link on p147 HOT 1
- Errata - Binomial coefficient typeset incorrectly HOT 1
- How to create conda enviroment on Windows ? HOT 2
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 bap3.