Created
June 30, 2023 23:19
-
-
Save abhijeet-talaulikar/fbc37c2fd31ed322aeddcb08f935d85a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mmm, trace = BayesianMMM("W") | |
| import matplotlib.pyplot as plt | |
| plt.figure(figsize=(15,5)) | |
| for channel in ['CTV', 'DIRECT_MAIL', 'EMAIL', 'TV']: | |
| plt.plot( | |
| trace.posterior[f'coefficient_{channel}'].values.mean(axis=(0,1)), | |
| linewidth=2, | |
| label=channel | |
| ) | |
| plt.title('Effectiveness over time') | |
| plt.xlabel('Week') | |
| plt.legend() | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment