Skip to content

Commit

Permalink
typos and feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
juanitorduz committed Aug 12, 2024
1 parent 120bc6f commit 893ac51
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions docs/source/notebooks/mmm/mmm_roas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
"\n",
"In the `raw_df` we have all all the columns needed in the data generating process to obtain the target variable `y`. For example, the `x1_adstock_saturated` column is the result of applying the adstock function and then the saturation to the `x1` channel.\n",
"\n",
"The target variable `y` is generates as \n",
"The target variable `y` is generated as \n",
"\n",
"```\n",
"y = amplitude * (trend + seasonality + z + x1_effect + x2_effect + epsilon)\n",
Expand Down Expand Up @@ -428,7 +428,7 @@
"source": [
"## Baseline Model\n",
"\n",
"To begin with, we fit a media mix model with a saturated adstock and logistic saturation using PyMC-Marketing's API. For more details on the model, please refer to the {ref}`mmm_example` notebook. As we discuss in that notebook, without any li test information, a good starting point is to pass the cost share into the prior of the beta channel coefficients."
"To begin with, we fit a media mix model, without including the unobserved confounder `z`, using a saturated adstock and logistic saturation using PyMC-Marketing's API. For more details on the model, please refer to the {ref}`mmm_example` notebook. As we discuss in that notebook, without any lift test information, a good starting point is to pass the cost share into the prior of the beta channel coefficients."
]
},
{
Expand Down Expand Up @@ -470,7 +470,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Observer that we are going to use a Gaussian process to model the non-linear trend component (see {ref}`(mmm_tv_intercept`).\n",
"Observe that we are going to use a Gaussian process to model the non-linear trend component (see {ref}`mmm_tv_intercept`).\n",
"\n",
"Let's fit the model!"
]
Expand Down Expand Up @@ -806,16 +806,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We see that the ROAS for `x1` is very different from the true ROAS! It actually implies `x1` is more effective than `x2`, but we know from the data generating process that `x2` is more effective!"
"We see that the ROAS for `x1` is very different from the true value. This is reflecting the bias induced by the unobserved confounder `z`. The models suggests that `x1` is more effective than `x2`, but we know from the data generating process that `x2` is more effective!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lift Test Model\n",
"\n",
"Now we fit a model with a lift test. We will use the same model configuration as before, but we free the priors of the beta channel coefficients as these are included in the saturation function parametrization. In this case we have lift test, which is much better that the simple cost share prior!"
"i\n",
"Now we fit a model with some lift tests. We will use the same model configuration as before, but we free the priors of the beta channel coefficients as these are included in the saturation function parametrization. In general, we expect lift tests priors or associated custom likelihoods to be better than the cost share prior."
]
},
{
Expand Down Expand Up @@ -1259,7 +1259,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The contributions look much bette and they are very close to the ones of the original blog post! Hence, **these two approaches are very similar**. However note that the PyMC-Marketing approach is more flexible as it allow to enrich the estimates with mmore test and different media spends to have a better understanding of the saturation effect."
"The contributions look much better and they are very close to the ones of the original blog post! Hence, **these two approaches are very similar**. However note that the PyMC-Marketing approach is more flexible as it allows to enrich the estimates with more test and different media spends to have a better understanding of the saturation effect."
]
},
{
Expand Down Expand Up @@ -1319,7 +1319,8 @@
"source": [
"## Conclusion\n",
"\n",
"In this notebook, we have shown that the PyMC-Marketing approach of adding lift test measurements to the model is very similar to the one proposed in the paper [Media Mix Model Calibration With Bayesian Priors](https://research.google/pubs/media-mix-model-calibration-with-bayesian-priors/) and the blog post [Media Mix Model and Experimental Calibration: A Simulation Study](https://juanitorduz.github.io/mmm_roas/). However, the PyMC-Marketing approach is more flexible as it allows to enrich the estimates with more lift test and different media spends to have a better understanding of the saturation effect. We have also seen why it is important to include the lift test measurements in the model to account for the unobserved confounders and to have a better understanding of the saturation effect."
"In this notebook, we have seen a concrete example of how media mix models can provide bias estimates when we have unobserved confounders in the model specification. Ideally, we'd add the confounder, but in the absence of that, we need to provide a reality anchor to the model to have meaningful estimates. We have shown that the PyMC-Marketing approach of adding lift test measurements to the model is very similar to the one proposed in the paper [Media Mix Model Calibration With Bayesian Priors](https://research.google/pubs/media-mix-model-calibration-with-bayesian-priors/) and the blog post [Media Mix Model and Experimental Calibration: A Simulation Study](https://juanitorduz.github.io/mmm_roas/).\n",
"However, the PyMC-Marketing approach is more flexible as it allows enriching the estimates with more lift tests and different media spending to better understand the saturation effect. We have also seen why it is essential to include the lift test measurements in the model to account for the unobserved confounders and better understand the saturation effect."
]
},
{
Expand Down

0 comments on commit 893ac51

Please sign in to comment.