Skip to content

In "Ch2_MorePyMC_PyMC3" under "Including observations in the Model" section #514

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
doh-wrong-button opened this issue Nov 29, 2020 · 0 comments

Comments

@doh-wrong-button
Copy link

doh-wrong-button commented Nov 29, 2020

This fixes 'normed' (which is deprecated) to 'density'. PS: I am a complete nooooob. If this is incorrect, I apologize. It worked for me :)....Thanks, signed your loving son, Homer

%matplotlib inline
from IPython.core.pylabtools import figsize
import matplotlib.pyplot as plt
import scipy.stats as stats
figsize(12.5, 4)

samples = lambda_1.random(size=20000)
#plt.hist(samples, bins=70, normed=True, histtype="stepfilled") normed is deprecated (old #code)
#density performs the same as normed (new code below)
plt.hist(samples, bins=70, density=True, histtype="stepfilled")
plt.title("Prior distribution for $\lambda_1$")
plt.xlim(0, 8);

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant