{"library":"pymc-marketing","title":"PyMC-Marketing","description":"A Python library for marketing statistical models built on top of PyMC. It provides Bayesian approaches to marketing mix modeling (MMM), customer lifetime value (CLV), and other marketing analytics. Current version 0.19.3, requires Python >=3.12. Released under active development with frequent updates.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install pymc-marketing","pip install 'pymc-marketing[all]'"],"cli":null},"imports":["from pymc_marketing.mmm import MMM","from pymc_marketing.clv import CLVModel"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pandas as pd\nfrom pymc_marketing.mmm import MMM\n\n# Load some data (replace with real data)\ndata = pd.DataFrame({\n    'date': pd.date_range('2022-01-01', periods=100),\n    'spend': np.random.uniform(100, 1000, 100),\n    'sales': np.random.normal(5000, 500, 100)\n})\n# Create model with dummy priors\nmmm = MMM(\n    date_column='date',\n    channel_columns=['spend'],\n    control_columns=[],\n    adstock_max_lag=4,\n    yearly_seasonality=2\n)\n# Sample (small draws for quick demo)\nmmm.fit(data, draws=100, tune=100, chains=1)\nprint(mmm.summary())","lang":"python","description":"Fits a Bayesian Marketing Mix Model using PyMC.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}