pymc-labs / pymc-marketing

Bayesian marketing toolbox in PyMC. Media Mix (MMM), customer lifetime value (CLV), buy-till-you-die (BTYD) models and more.
https://www.pymc-marketing.io/
Apache License 2.0
704 stars 194 forks source link

Example notebooks to not specify what version of pymc-marketing was used when last executed #845

Open cluhmann opened 3 months ago

cluhmann commented 3 months ago

The MMM example notebook, the Budget Allocation notebook, the Lift Test Calibration notebook, and likely others specify the versions of python, matplotlib, arviz, numpy, pandas, pymc, and pytensor. Strangely, the version of pymc-marketing is not included. This makes it very difficult to know what features described in the notebook might require in terms of package versions. The version of pymc-marketing seems much more important than the version of something like matplotlib.

Furthermore, the CLV quickstart notebook has no package versions listed at all.

The only notebooks I could find that include a pymc-marketing version are the Pareto/NBD Model notebook, the "Shifted Beta Geometric model with individual customer data" notebook, the "Custom Models with MMM components", and the "other samplers" notebook.

wd60622 commented 3 months ago

Good thinking. Weird because the watermark command seems to be the same and version of that package is the same. Likely best to just be explicit with pymc marketing.

How are these as steps?

cluhmann commented 3 months ago

Looks like it's because pymc-marketing isn't being imported (only MMM is being imported from pymc_marketing.mmm.delayed_saturated_mmm). So we can either import pymc-marketing and then do from pymc_marketing.mmm.delayed_saturated_mmm import MMM or we can explicitly request pymc-marketing to be included in the watermark via the -p PACKAGES or --packages PACKAGES arguments.