Created
June 30, 2023 23:25
-
-
Save abhijeet-talaulikar/f7fed3bdc9cbb309f86ee088cbc38d0f 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("Q") | |
paid_search_df = pd.DataFrame({ | |
'quarter': "Quarter "+pd.PeriodIndex(dates, freq='Q').astype(str).str[-1].astype(str).values, | |
'coefficient': trace['posterior']['coefficient_PAID_SEARCH'].mean(axis=(0,1)) | |
}) | |
paid_search_df.groupby('quarter').mean().plot.bar(); | |
plt.title("Paid Search Effectiveness over Quarters") | |
plt.ylim(bottom=0.12) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment