Inspecting the model
Well done getting the model-building right! The trace
is available in your workspace and, following the best practices, you will now inspect the posterior draws to see if there are any convergence issues. Next, you will extract each model parameter from the trace and summarize it with its posterior mean. These posterior means will come in handy later, when you will be making predictions with the model. Let's take a look at the parameter draws!
You will need to use pymc3
and numpy
, which have been imported for you as pm
and np
, respectively.
NOTE: Please allow up to half a minute for the plots to render, since they have many draws to process.
This exercise is part of the course
Bayesian Data Analysis in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Draw a trace plot of trace
____
plt.show()
# Print a summary of trace
summary = ____
print(summary)