CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.51k stars 7.84k forks source link

Ch3.type error at Example: Unsupervised Clustering using a Mixture Model #552

Open hungyangtsai opened 1 year ago

hungyangtsai commented 1 year ago

when i ran code bellow ~

with model: step1 = pm.Metropolis(vars=[p, sds, centers]) step2 = pm.ElemwiseCategorical(vars=[assignment]) trace = pm.sample(25000, step=[step1, step2])

show error message: TypeError: Unknown parameter type: <class 'theano.tensor.var.TensorVariable'>

Can anyone tell me what's happen? I had not change any code, just ran it。 I used pymc3。 Thanks!

JosephZahar commented 1 year ago

Try the following and then run back the code :) conda install -c conda-forge pymc3=3.11.0

hungyangtsai commented 1 year ago

Try the following and then run back the code :) conda install -c conda-forge pymc3=3.11.0

I'm so sorry to reply your command too late, I tried on a new computer,and it's work,but old one still didn't。Thanks your help!