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.
Cet exercice fait partie du cours
Bayesian Data Analysis in Python
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Draw a trace plot of trace
____
plt.show()
# Print a summary of trace
summary = ____
print(summary)