Analyzing regression parameters
Your linear regression model has four parameters: the intercept, the impact of clothes ads, the impact of sneakers ads, and the variance. The draws from their respective posterior distributions have been sampled for you and are available as intercept_draws
, clothes_draws
, sneakers_draws
, and sd_draws
, respectively.
Before you make predictions with your model, it's a good practice to analyze the posterior draws visually. In this exercise, you will first take a look at the descriptive statistics for each parameter's draws, and then you will visualize the posterior distribution for one of them as an example. pymc3
and pandas
have been imported for you as pm
and pd
, respectively. Let's take a look at the parameters draws!
Diese Übung ist Teil des Kurses
Bayesian Data Analysis in Python
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Collect parameter draws in a DataFrame
posterior_draws_df = ____({
"intercept_draws": ____,
"clothes_draws": ____,
"sneakers_draws": ____,
"sd_draws": ____,
})