Skip to content
Discussion options

You must be logged in to vote

Went with this for now:

fig = mmm.plot_direct_contribution_curves(show_fit=True, xlim_max=1.5)

# Customize the axes labels since your target is orders
for ax in fig.axes:
    ax.set_xlabel('Daily Spend ($)')
    ax.set_ylabel('Total Daily Orders')
    ax.set_title(ax.get_title().replace('contribution', 'Total Orders'))

plt.show()
X_test_means = X_test[mmm.channel_columns].mean()

print("Mean of X_test for each channel:")
for channel, mean_value in X_test_means.items():
    print(f"{channel}: {mean_value:.2f}")
import numpy as np
marginal_cost_per_order = {}

for i, ax in enumerate(fig.axes):
   channel_name = mmm.channel_columns[i]
   mean_spend = X_test_means[channel_name]
   
   cur…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AnantChandra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant