google / lightweight_mmm

LightweightMMM 🦇 is a lightweight Bayesian Marketing Mix Modeling (MMM) library that allows users to easily train MMMs and obtain channel attribution information.
https://lightweight-mmm.readthedocs.io/en/latest/index.html
Apache License 2.0
829 stars 172 forks source link

Baseline Contribution Area Plot colours are non-unique #257

Closed Aanai closed 8 months ago

Aanai commented 8 months ago

There are 13 channels in my model and the function plot_media_baseline_contribution_area_plot which produces an area plot showing the contribution of the media channels and baseline recycles the same colour for more than one channel. This obviously makes the plot unreadable. Is it possible to fix this?

Aanai commented 8 months ago

The dataframe that is used to create the stacked area plot can be obtained using the function lightweight_mmm.plot.create_media_baseline_contribution_df and this data can be used to plot, using custom colours.

https://lightweight-mmm.readthedocs.io/en/latest/api.html?highlight=baseline_contribution_df#lightweight_mmm.plot.create_media_baseline_contribution_df