BayesianMMM — State of the Art Media Mix Modelling
BayesianMMM-媒体混合建模的最新进展

李子涵    西安石油大学
时间:2026-04-24 语向:英-中 类型:人工智能 字数:766
  • BayesianMMM — State of the Art Media Mix Modelling
    BayesianMMM-媒体混合建模的最新进展
  • BayesianMMM — State of the Art Media Mix Modelling
    BayesianMMM-媒体混合建模的最新进展
  • Test a bayesian model of your media mix effortlessly
    毫不费力地测试媒体组合的贝叶斯模型
  • Testing a new marketing mix model is time costly. That is the reason behind the development of BayesianMMM a script to fit MMM without writing code.
    测试一个新的营销组合模式是非常费时的。这就是BayesianMMM开发背后的原因,BayesianMMM是一个不需要编写代码就能适应MMM的脚本。
  • Within a few hours, you could be looking at the results of the state of the art model.
    在几个小时内,您可以看到模型的结果。
  • Audience
    观众
  • marketing data scientist
    营销数据科学家
  • marketing machine learning engineering
    营销机器学习工程
  • marketing data analyst
    营销数据分析员
  • campaign manager/owner
    活动经理/负责人
  • Introduction
    导言
  • Media Mix Modelling is the holy grail of marketing science. An accurate media mix model can give us the optimal media mix, the one that reduces media spending while increasing revenue.
    媒体混合建模是营销科学的"圣杯"。一个准确的媒体组合模型可以给我们最好的媒体组合,在增加收入的同时减少媒体支出的组合。
  • A media mix model uncovers the causal relationship between media spends and revenue.
    一个媒体组合模型揭示了媒体支出与收入之间的因果关系。
  • The dataset used to train such model generally is at a weekly level, and looks something like this,
    用于训练这种模型的数据集通常是每周级别的,
  • Model
    模型
  • The model used in BayesianMMM was proposed in Bayesian Methods for Media Mix Modeling with Carryover and Shape Effects by a team of researchers from Google.
    在“贝叶斯MMM”模型中所使用的这一模型,是由谷歌团队的一组研究人员在《考虑延续效应和形状效应的媒体组合建模的贝叶斯方法》一文中提出的。
  • Just like a classic MMM, it aims to predict sales based on media spends and additional control variables (season, weather etc). However, there are three key updates to the classic regression model.
    就和传统的MMM方法一样,它旨在根据媒体投入以及其他控制变量(如季节、天气等)来预测 销售额。然而,与传统的回归模型相比,它有三个关键的改进之处。
  • Carryover effect
    延续效应
  • Media spends have a lasting effect on sales, a dollar spent on a given week will contribute to sales for multiple weeks. We call this effect, the carryover effect and it is explicitly incorporated in the model.
    媒体投放费用会对销售产生长期影响,每周投入的一美元都会在多个周数内为销售业绩做出贡献。我们将其称为“延续效应”,并且这一效应已在模型中得到了明确的考虑。
  • Two mathematical functions can be used to model the carryover effect.
    两个数学函数可以用来模拟延续效应。
  • Geodecay
    地质衰变
  • The geodecay transformation only models the lasting impact of media spends.
    “地质哀减转换”仅用于模拟媒本投入所产生的长期影响。
  • This function takes as input media spends for a given media during L weeks periods, L and the retain-rate. L is the maximum duration effect of a spend. L can be treated as a hyperparameter, defined using business knowledge or set to 13 (in simulation settings L has been found to be a good approximation of infinity) as proposed in the research paper. The retain rate is the coefficient that gives us the retained spend during the next period (t+1) using the spend during the current period (t).
    此函数的输入为在L个周期内某一媒体的投放费用以及其保留率。L和保留率值。L表示一次投放费用的最大影响持续时间。L可中以被视为一个超参数,可通过业务知识来定义,或者设置为13( L 在模拟环境中发现,L在很大程度上充分逼近无穷大)这是该研究文论文中提出的建议。保留率是根据当前周期(t)的投放费用计英算出下一个周期(t+1)的保留投放费用的系数。
  • Here, we set the spend to be 1 at lag = 0 and 0 otherwise. With a retain rate of 0.7, we obtained the following carryover spend.
    在此,我们将滞后值为0时的支出设定为1,其他情况则设为0. 基于0.7的保留率,我们得到了以下的累计支出情况。
  • Adstock transformation
    Adstock变换
  • Sometimes we expect the media spends effect to peak after a certain duration. The adstock transformation models the lasting and delayed impact of media spends.
    有时我们预期媒体投入的效果会在一定时间后达到峰值。而“Adstock”模型则能够反映媒体投入所产生的持续且延迟的影响。
  • This function takes as input media spends for a given media during L weeks periods, L, the retain-rate and the delay of the peak. The delay is the number of periods before the peak effect.
    此函数的输入参数包括某一媒体在L个周期内的投入费用、L值(表示周期数)、保留率值以及峰值出现的延迟时间。延迟时间指的是峰值效应出现之前的周期数。
  • Here again, we set the spend to be 1 at lag = 0 and 0 otherwise. With a retain rate of 0.7 and a delay of 5, we obtained the following adstock spend.
    同样地,我们将支出设定为在滞后值为0时为1,在其他情况下为0。假设保留率为0.7,延迟时间为5, 我们得到了以下的累积支出情况。
  • Shape effect
    形状效应
  • Media spends produce diminishing returns as they grow bigger. We call this the shape effect and it is explicitly incorporated in the model.
    媒体支出的回报随着媒体规模的扩大而递减。我们称之为形状效应,并且已在模型中得到了明确的考虑。
  • Hill
    希尔
  • This function takes as input the spend at period t, the shape and the half-saturation. The parameters are not as interpretable as the ones of the carryover transformations. T understand them you would have to play around with them.
    该函数以周期t处的花费,形状和半饱和度作为输入。这些参数的解释性不像延续性转换的参数那么强。要理解他们,您需要亲自进行实验操作。
  • Here we set the spend to 1, the shape to 0.5 and the half-saturation to 0.5.
    这里我们将花费设置为1,形状设置为0.5,半饱和度设置为0.5。
  • Putting it all together our model can be expressed as follows:
    综合起来,我们的模型可以表示为:
  • Fitting method
    拟合法
  • The model parameters are estimated using MCMC via the pystan API.
    通过pystan API使用MCMC估计模型参数。
  • We set the same priors on the parameters’ distribution as in the research paper.
    我们对参数的分布设定了与研究论文中相同的先验条件。
  • After a user-defined number of iterations, we obtained samples of our parameters’ posterior distribution. We use those samples to estimate the parameters true value.
    在经过用户设定的一定次数的迭代后,我们得到了参数后验分布的样本。我们利用这些样本来估算参数的真实值。
  • Challenges
    挑战
  • There are big challenges in fitting a media mix model, Here is a non-exhaustive list of them.
    在拟合一个媒体组合模型时有很大的挑战,以下是一份不完全列举的清单。
  • The limited amount of data available
    有限的可用数据
  • The amount of data available is small compared to the number of parameters. This can lead to accuracy issues and introduce some bias in the test and evaluation accuracy.
    可获取的数据量与参数数量相比显得很少。这可能会导致准确性问题,并在测试和评估的准确性方面引入一些偏差。
  • Correlation between the input variables
    输入变量之间的相关性
  • Often there is a high correlation between the media spends. This can lead to bad attribution of sales to the sales channel.
    通常,各媒体的投入金额之间存在较高的相关性。这可能会导致销售业绩无法准确归因于相应的销售渠道。
  • Limited range of data
    有限的数据范围
  • The limited range of data may also be a problem as marketing stakeholders always want to extrapolate the results.
    有限的数据范围或许也是一个问题,因为营销相关方总是希望对这些结果进行推断。
  • You can read more on those challenges and how to approach them in Challenges And Opportunities In Media Mix Modeling.
    您可以在《媒体组合模型中的挑战与机遇》一文中进一步了解这些挑战以及应如何应对它们。
  • Results
    结果
  • After running the script we get the following results,
    运行脚本后,我们得到了以下结果,
  • Here you can see the contribution analysis plot generated using a demo dataset.
    在这里,您可以看到使用演示数据集生成的贡献分析图。
  • Usage
    用法
  • To learn how to use BayesianMMM please refer to the Github repo.
    要了解如何使用BayesianMMM,请参考Github Repo。
  • Conclusion
    结论
  • While the BayesianMMM script will greatly reduce the time needed to test the state of the art media mix model, it does not deal with all the challenges. You will still have to handle those yourself!
    虽然贝叶斯MMM脚本能够大幅缩短测试当前最先进媒体组合模型所需的时间,但它并不能解决所有难题。您仍需自行应对那些问题!
  • Thanks for reading, you can connect with me on LinkedIn.
    谢谢你的阅读,你可以在LinkedIn上和我联系。

400所高校都在用的翻译教学平台

试译宝所属母公司