Skip to content

Commit

Permalink
fix minor typos (pymc-labs#1215)
Browse files Browse the repository at this point in the history
  • Loading branch information
SangamSwadiK authored Nov 19, 2024
1 parent 3e7523d commit 0c5e369
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/notebooks/mmm/mmm_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"Before jumping into the data, let's first define the business problem we are trying to solve. We are a marketing agency and we want to optimize the marketing budget of a client. We have access to the following data:\n",
"\n",
"- Sales data: weekly sales of the client.\n",
"- Media spend data: weekly spend on different media channels (e.g. TV, radio, online, etc.). In ths example we consider 2 media channels: $x_{1}$ and $x_{2}$.\n",
"- Media spend data: weekly spend on different media channels (e.g. TV, radio, online, etc.). In this example we consider 2 media channels: $x_{1}$ and $x_{2}$.\n",
"- Domain knowledge: \n",
" - We know that there has a been an positive sales trend which we believe comes from a strong economic growth.\n",
" - We also know that there is a yearly seasonality effect.\n",
Expand Down Expand Up @@ -127,13 +127,13 @@
"1. On the one hand side, there is a carry-over effect. Meaning, the effect of spend on sales is not instantaneous but accumulates over time.\n",
"2. In addition, there is a saturation effect. Meaning, the effect of spend on sales is not linear but saturates at some point.\n",
"\n",
"The equation implemented to describe the DAG presented above will be the one expressed in [Jin, Yuxue, et al. “Bayesian methods for media mix modeling with carryover and shape effects.” (2017)](https://research.google/pubs/pub46001/), adding a causal assumption around the media effects and their exclusively possitive impact. Concretely, given a time series target variable $y_{t}$ (e.g. sales or conversions), media variables $x_{m, t}$ (e.g. impressions, clicks or costs) and a set of control covariates $z_{c, t}$ (e.g. holidays, special events) we consider a linear model of the form \n",
"The equation implemented to describe the DAG presented above will be the one expressed in [Jin, Yuxue, et al. “Bayesian methods for media mix modeling with carryover and shape effects.” (2017)](https://research.google/pubs/pub46001/), adding a causal assumption around the media effects and their exclusively positive impact. Concretely, given a time series target variable $y_{t}$ (e.g. sales or conversions), media variables $x_{m, t}$ (e.g. impressions, clicks or costs) and a set of control covariates $z_{c, t}$ (e.g. holidays, special events) we consider a linear model of the form \n",
"\n",
"$$\n",
"y_{t} = \\alpha + \\sum_{m=1}^{M}\\beta_{m}f(x_{m, t}) + \\sum_{c=1}^{C}\\gamma_{c}z_{c, t} + \\varepsilon_{t},\n",
"$$\n",
"\n",
"where $\\alpha$ is the intercept, $f$ is a media transformation function and $\\varepsilon_{t}$ is the error therm which we assume is normally distributed. The function $f$ encodes the positive media contribution on the target variable. Typically we consider two types of transformation: adstock (carry-over) and saturation effects.\n",
"where $\\alpha$ is the intercept, $f$ is a media transformation function and $\\varepsilon_{t}$ is the error term which we assume is normally distributed. The function $f$ encodes the positive media contribution on the target variable. Typically we consider two types of transformation: adstock (carry-over) and saturation effects.\n",
"\n",
"In **PyMC-Marketing**, we offer an API for a Bayesian Media Mix Model (MMM) with various specifications. In the example, we’ll implement `Geometric Adstock` and `Logistic Saturation` as the chosen transformations for our previously discussed Structural Causal Equation."
]
Expand Down

0 comments on commit 0c5e369

Please sign in to comment.