You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running the following code within Jupyter Notebook (the code is adapted from ch. 2 of "Bayesian Methods for Hackers
by Cameron Davidson-Pilon", see notebook, cells 24--26.
importpymc3aspmimportscipy.statsasstats#figsize(12, 4)#these two quantities are unknown to us.true_p_A=0.05true_p_B=0.04#notice the unequal sample sizes -- no problem in Bayesian analysis.N_A=15000N_B=750#generate some observationsobservations_A=stats.bernoulli.rvs(true_p_A, size=N_A)
observations_B=stats.bernoulli.rvs(true_p_B, size=N_B)
withpm.Model() asmodel:
p_A=pm.Uniform("p_A", 0, 1)
p_B=pm.Uniform("p_B", 0, 1)
# Define the deterministic delta function. This is our unknown of interest.delta=pm.Deterministic("delta", p_A-p_B)
# Set of observations, in this case we have two observation datasets.obs_A=pm.Bernoulli("obs_A", p_A, observed=observations_A)
obs_B=pm.Bernoulli("obs_B", p_B, observed=observations_B)
# To be explained later.step=pm.Metropolis()
trace=pm.sample(20000, step=step)
burned_trace=trace[1000:]
I run the above code, then re-run it by changing
true_p_B=0.54
At the second run, the execution will stop at the end of sampling with a pop-up message "the kernel appears to have died. it will restart automatically" (no other messages displayed). Since then, I am unable to use pymc3 unless I reboot the machine.
Same problems by porting the code into Spyder.
edit Unfortunately I am unable to always reproduce the error. It seems to have a randomic behavior.
Please provide any additional information below.
Versions and main components
PyMC3 Version: 3.9.2
Theano Version: 1.0.4
Python Version: 3.7.7
Operating system: Linux Mint 20
How did you install PyMC3: (conda/pip) conda
The text was updated successfully, but these errors were encountered:
#3285 Description of your problem
I am running the following code within Jupyter Notebook (the code is adapted from ch. 2 of "Bayesian Methods for Hackers
by Cameron Davidson-Pilon", see notebook, cells 24--26.
I run the above code, then re-run it by changing
At the second run, the execution will stop at the end of sampling with a pop-up message "the kernel appears to have died. it will restart automatically" (no other messages displayed). Since then, I am unable to use pymc3 unless I reboot the machine.
Same problems by porting the code into Spyder.
edit Unfortunately I am unable to always reproduce the error. It seems to have a randomic behavior.
Please provide any additional information below.
Versions and main components
The text was updated successfully, but these errors were encountered: