|
1203 | 1203 | "\n", |
1204 | 1204 | "**Important**: The choice between absolute and normalized values depends on how your MMM preprocesses media spend data. If your MMM normalizes spend by dividing by the maximum, use normalized values. If it uses raw spend, use absolute values.\n", |
1205 | 1205 | "\n", |
1206 | | - "Example formatting for PyMC-Marketing (which typically expects normalized values):\n", |
| 1206 | + "Example formatting for PyMC-Marketing (which does _not_ require normalized values):\n", |
1207 | 1207 | "\n", |
1208 | 1208 | "```python\n", |
1209 | 1209 | "# Calculate normalized values based on your MMM's scaling\n", |
1210 | | - "max_weekly_spend = 150_000 # Maximum weekly spend in your MMM training data\n", |
1211 | 1210 | "promo_spend_weekly = 50_000 # Weekly spend during this test\n", |
1212 | 1211 | "\n", |
1213 | 1212 | "lift_test_df = pd.DataFrame({\n", |
1214 | 1213 | " \"channel\": [\"tv_promo\"],\n", |
1215 | 1214 | " \"x\": [0.0], # Baseline spend for tv_promo (normalized) - it's zero before test\n", |
1216 | | - " \"delta_x\": [promo_spend_weekly / max_weekly_spend], # Spend increment (normalized) = 0.33\n", |
| 1215 | + " \"delta_x\": [promo_spend_weekly], # Spend increment\n", |
1217 | 1216 | " \"delta_y\": [1162.38], # Mean lift from ITS result\n", |
1218 | 1217 | " \"sigma\": [199.05] # Std of lift from ITS result\n", |
1219 | 1218 | "})\n", |
1220 | 1219 | "```\n", |
1221 | 1220 | "\n", |
1222 | | - "**Alternative**: Some MMM implementations may expect the actual spend level (`x + delta_x`) rather than the increment. Check your MMM's documentation for the expected format.\n", |
1223 | | - "\n", |
1224 | 1221 | "See the [PyMC-Marketing lift test calibration guide](https://www.pymc-marketing.io/en/latest/notebooks/mmm/mmm_lift_test.html) for complete integration details.\n", |
1225 | 1222 | ":::\n" |
1226 | 1223 | ] |
|
0 commit comments