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

Get contribution from predict #279

Open Citronelol opened 7 months ago

Citronelol commented 7 months ago

Hello there,

First of all, huge thanks for this awesome project.

I was wondering : would it be possible to extract the contribution of each media channel when using the predict() method ?

I am aware of this method: https://github.com/google/lightweight_mmm/blob/main/lightweight_mmm/plot.py#L144 but it seems that it returns the contribution on the train time series. How would one use it to decompose predictions ?

Many thanks in advance !