You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+5-6
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@
17
17
18
18
## Marketing Analytics Tools from [PyMC Labs](https://www.pymc-labs.com)
19
19
20
-
21
20
Unlock the power of **Marketing Mix Modeling (MMM)** and **Customer Lifetime Value (CLV)** analytics with PyMC-Marketing. This open-source marketing analytics tool empowers businesses to make smarter, data-driven decisions for maximizing ROI in marketing campaigns.
@@ -42,11 +41,11 @@ Leverage our Bayesian MMM API to tailor your marketing strategies effectively. B
42
41
-**Adstock Transformation**: Optimize the carry-over effects in your marketing channels.
43
42
-**Saturation Effects**: Understand the diminishing returns in media investments.
44
43
-**Budget Optimization**: Allocate your marketing spend efficiently across various channels for maximum ROI.
45
-
-**Experiment Calibration**: Fine-tune your model based on empirical experiments for more unified view of marketing.
44
+
-**Experiment Calibration**: Fine-tune your model based on empirical experiments for a more unified view of marketing.
46
45
47
46
Explore a hands-on [simulated example](https://pymc-marketing.readthedocs.io/en/stable/notebooks/mmm/mmm_example.html) for more insights into MMM with PyMC-Marketing.
48
47
49
-
### Essential Reading for Marketing Mix Modeling (MMM):
48
+
### Essential Reading for Marketing Mix Modeling (MMM)
50
49
51
50
-[Bayesian Media Mix Modeling for Marketing Optimization](https://www.pymc-labs.com/blog-posts/bayesian-media-mix-modeling-for-marketing-optimization/)
52
51
-[Improving the Speed and Accuracy of Bayesian Marketing Mix Models](https://www.pymc-labs.com/blog-posts/reducing-customer-acquisition-costs-how-we-helped-optimizing-hellofreshs-marketing-budget/)
@@ -77,7 +76,7 @@ Explore our detailed CLV examples using data from the [`lifetimes`](https://gith
77
76
78
77
PyMC-Marketing is and will always be free for commercial use, licensed under [Apache 2.0](LICENSE). Developed by core developers behind the popular PyMC package and marketing experts, it provides state-of-the-art measurements and analytics for marketing teams.
79
78
80
-
Due to its opensource nature and active contributor base, new features get added constantly. Missing a feature or want to contribute? Fork our repository and submit a pull request. For any questions, feel free to [open an issue](https://github.com/your-repo/issues).
79
+
Due to its open-source nature and active contributor base, new features are added constantly. Missing a feature or want to contribute? Fork our repository and submit a pull request. For any questions, feel free to [open an issue](https://github.com/your-repo/issues).
81
80
82
81
## Marketing AI Assistant: MMM-GPT with PyMC-Marketing
83
82
@@ -95,7 +94,7 @@ For businesses looking to integrate PyMC-Marketing into their operational framew
95
94
96
95
We provide the following professional services:
97
96
98
-
-**Custom Models**: We tailor niche marketing anayltics models to fit your organization's unique needs.
99
-
-**Build Within PyMC-Marketing**: Our team are experts leveraging the capabilities of PyMC-Marketing to create robust marketing models for precise insights.
97
+
-**Custom Models**: We tailor niche marketing analytics models to fit your organization's unique needs.
98
+
-**Build Within PyMC-Marketing**: Our team members are experts leveraging the capabilities of PyMC-Marketing to create robust marketing models for precise insights.
100
99
-**SLA & Coaching**: Get guaranteed support levels and personalized coaching to ensure your team is well-equipped and confident in using our tools and approaches.
101
100
-**SaaS Solutions**: Harness the power of our state-of-the-art software solutions to streamline your data-driven marketing initiatives.
Copy file name to clipboardexpand all lines: docs/source/guide/mmm/mmm_intro.md
+4
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ One approach might be to use heuristics, i.e. sensible rules of thumb, about wha
7
7
Fortunately, with Bayesian modeling, we can do better than this! So-called Media Mix Modeling (MMM) can estimate how effective each advertising channel is in driving our outcome measure of interest, whether that is sales, new customer acquisitions, or any other key performance indicator (KPI). Once we have estimated each channel's effectiveness we can optimize our budget allocation to maximize our KPI.
8
8
9
9
## What can you do with Media Mix Modeling?
10
+
10
11
Media Mix Modeling gives rich insights and is used in many ways, but here are some of the highlights:
11
12
12
13
1. Understand the effectiveness of different media channels in driving customer acquisition. Not only can you learn from data about the most influential media channels for your business, but you can update this understanding over time. By incorporating new marketing and customer acquisition data on an ongoing basis, you can learn about the changing effectiveness of each channel over time.
@@ -19,6 +20,7 @@ Media Mix Modeling gives rich insights and is used in many ways, but here are so
19
20

20
21
21
22
## How does Media Mix Modeling work?
23
+
22
24
In simple terms, we can understand MMMs as regression modeling applied to business data. The goal is to estimate the impact of marketing activities and other drivers on a metric of interest, such as the number of new customers per week.
23
25
24
26
To do this, we use two main types of predictor variables:
@@ -28,11 +30,13 @@ To do this, we use two main types of predictor variables:
28
30
The basic approach to MMMs uses linear regression to estimate a set of coefficients for the relative importance of each of these predictors, but real-world MMMs commonly incorporate also non-linear factors to more accurately capture the effect of marketing activities on consumer behaviour:
29
31
30
32
### The reach (or saturation) function
33
+
31
34
Rather than model our KPI as a linear function of marketing spend, the reach function models the potential saturation of different channels: While the initial money spent on an advertising channel might have a big impact on customer acquisition, further investment will often lead to diminishing returns as people get used to the message. When we think about optimization, modeling this effect is critical. Some channels may be nowhere close to being saturated and yield significant increases in customer acquisitions for spending for that channel. Knowing the saturation of each channel is vital in making future marketing spend decisions.
32
35
33
36

34
37
35
38
### The adstock function
39
+
36
40
The marketing spend for a given channel may have a short-term effect or long-term impact. Remember that jingle from a TV ad you've seen 20 years ago? That's a great long-term impact. The adstock function captures these time-course effects of different advertising channels. Knowing this is crucial - if we know some channels have short-term effects that quickly decay over time, we could plan to do more frequent marketing. But suppose another channel has a long, drawn-out impact on driving customer acquisitions. In that case, it may be more effective to use that channel more infrequently.
where :math:`\\alpha` is the intercept, :math:`f` is a media transformation function and :math:`\\varepsilon_{t}` is the error therm
728
+
which we assume is normally distributed. The function :math:`f` encodes the contribution of media on the target variable.
729
+
Typically we consider two types of transformation: adstock (carry-over) and saturation effects.
730
+
731
+
Notes
732
+
-----
733
+
Here are some important notes about the model:
734
+
735
+
1. Before fitting the model, we scale the target variable and the media channels using the maximum absolute value of each variable.
736
+
This enable us to have a more stable model and better convergence. If control variables are present, we do not scale them!
737
+
If needed please do it before passing the data to the model.
738
+
739
+
2. We allow to add yearly seasonality controls as Fourier modes. You can use the `yearly_seasonality` parameter to specify the number of Fourier modes to include.
740
+
741
+
3. This class also allow us to calibrate the model using:
742
+
743
+
- Custom priors for the parameters via the `model_config` parameter. You can also set the likelihood distribution.
744
+
- Adding lift tests to the likelihood function via the :meth:`add_lift_test_measurements <pymc_marketing.mmm.delayed_saturated_mmm.DelayedSaturatedMMM.add_lift_test_measurements>` method.
745
+
746
+
For details on a vanilla implementation in PyMC, see [2]_.
747
+
748
+
Examples
749
+
--------
750
+
Here is an example of how to instantiate the model with the default configuration:
751
+
752
+
.. code-block:: python
753
+
754
+
import numpy as np
755
+
import pandas as pd
756
+
757
+
from pymc_marketing.mmm import DelayedSaturatedMMM
0 commit comments