aloctavodia / BAP

Bayesian Analysis with Python (Second Edition)
https://www.amazon.com/dp/B07HHBCR9G
MIT License
646 stars 250 forks source link

the code "Multiple logistic regression" error #74

Closed kunyaoli closed 2 years ago

kunyaoli commented 3 years ago

I run the code about chapter 4 "Multiple logistic regression"

`with pm.Model() as model_1: α = pm.Normal('α', mu=0, sd=10) β = pm.Normal('β', mu=0, sd=2, shape=len(x_n))

μ = α + pm.math.dot(x_1, β) 
θ = pm.Deterministic('θ', 1 / (1 + pm.math.exp(-μ))) 
bd = pm.Deterministic('bd', -α/β[1] - β[0]/β[1] * x_1[:,0])

yl = pm.Bernoulli('yl', p=θ, observed=y_1) 

trace_1 = pm.sample(2000)`

but i meet some error:

"Auto-assigning NUTS sampler... Initializing NUTS using jitter+adapt_diag...

You can find the C code in this temporary file: C:\Users\ADMINI~1\AppData\Local\Temp\theano_compilation_error_09yx1jkm library blas is not found. " when I run the code “ chapter 4” is OK。 python3.8 pymc3.8 win10

kunyaoli commented 3 years ago

code “ chapter 4” is OK

code “ chapter 3” is OK

aloctavodia commented 2 years ago

Sorry, for the late reply, somehow I missed this. Is this still a problem, I recommend following the installation instructions and create an environment with the required packages.