CommencerCommencer gratuitement

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!

Cet exercice fait partie du cours

Bayesian Data Analysis in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Collect parameter draws in a DataFrame
posterior_draws_df = ____({
    "intercept_draws": ____,
    "clothes_draws": ____,
  	"sneakers_draws": ____,
    "sd_draws": ____,
})
Modifier et exécuter le code