Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same pre-optimization and post-optimization channel budget allocation ratios , but suggesting much higher budget instead of aligning the budget to the one i requested. #297

Open
entzyeung opened this issue Jan 7, 2024 · 10 comments

Comments

@entzyeung
Copy link

Dear LMMM Team,

I want to express my sincere appreciation for the hard work you've dedicated to creating this remarkable model. It's truly impressive and has proven to be user-friendly and easy to install, unlike my previous attempt with the FB Robyn model, which I eventually abandoned due to its complexity. Discovering your model felt like a ray of sunshine after a cloudy day.

To cut to the chase, I've encountered a similar issue to that of @DongHarry-Kang. I've spent considerable time experimenting with various datasets and fine-tuning for two weeks. However, I consistently obtain similar results when calling the plot_pre_post_budget_allocation_comparison function.

I've included some sample outputs below:

Output 1

Output 2

I've thoroughly examined data quality using check_data_quality(), assessed variances with highlight_variances(), reviewed spend fractions with highlight_low_spend_fractions(), and analyzed variance inflation factors with highlight_high_vif_values(). The datasets appear to be in good shape and suitable for analysis. I even trained the best model with parameters obtained from Gridsearches. However, when it comes to the critical aspect of budget allocation, it seems there may be an issue.

Regardless of how I adjust the budget and cost parameters, the model consistently produces the same outcome: maintaining the same channel ratios while suggesting a higher budget allocation.

Allow me to illustrate this with an example.
Screenshot 2024-01-07 at 22 55 23

As you can see from the investigation, the model did suggest me different and higher budget while maintaining the same channel ratios. I am so confused that why the model not reallocating the budgets as the documentation said? and keep increasing our budget instead?
is there any params I missed? if not, is there any way to fix it?

Here is my syntax when calling the optimizatin function:

Run optimization with the parameters of choice.

solution, kpi_without_optim, previous_media_allocation = optimize_media.find_optimal_budgets(
            n_time_periods= n_time_periods,
            media_mix_model= mmm,
            extra_features= extra_features_test[:n_time_periods],# it has been scaled.
            budget= budget,
            prices= prices,
            media_scaler = media_scaler,
            target_scaler = target_scaler,
            )

Plot out pre post optimization budget allocation and predicted target variable comparison.

plot.plot_pre_post_budget_allocation_comparison(media_mix_model=mmm, 
                                                kpi_with_optim=solution['fun'], 
                                                kpi_without_optim=kpi_without_optim,
                                                optimal_buget_allocation=optimal_buget_allocation, 
                                                previous_budget_allocation=previous_budget_allocation, 
                                                figure_size=(10,10))

Thank you in advance.

@santiarias
Copy link

@entzyeung could you post your baseline_contribution_area plot?

@entzyeung
Copy link
Author

Thank you @santiarias, here you go.
Screenshot 2024-01-12 at 15 25 48

and i have another discussion going on: here

@santiarias
Copy link

santiarias commented Jan 12, 2024

@entzyeung thanks, could you also do a mmm.print_summary() and plot_model_fit and post them here?
And some very small sample of your data?
sorry for asking this in 2 different messages

@entzyeung
Copy link
Author

entzyeung commented Jan 12, 2024

No problem at all, but I m outside right now, I will send once I go back home. Thank you @santiarias

@entzyeung
Copy link
Author

entzyeung commented Jan 12, 2024

@santiarias here you go! It's looks like a workable model to my eyes, maybe i am wrong.

Screenshot 2024-01-12 at 21 09 59 Screenshot 2024-01-12 at 21 10 22

@entzyeung
Copy link
Author

entzyeung commented Jan 16, 2024

@santiarias please feel free to let me know if you want some extra info about my model anytime.

@santiarias
Copy link

@entzyeung yeah if you could just show a very small sample of your training data (just a few rows is enough)

@entzyeung
Copy link
Author

@santiarias sure thing, here you go.
Data
I extracted the first 10 rows of each dataset just before applying jnp.array to them.
Screenshot 2024-01-16 at 18 20 02

@entzyeung
Copy link
Author

@santiarias does the link work? please feel free to let me know if it is not working.

@entzyeung
Copy link
Author

entzyeung commented Feb 16, 2024

Would the development team please help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants