加入新推出的
Discord 社区,展开实时讨论,获得同行支持,并直接与 Meridian 团队互动!
投资回报率先验和校准
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
通过投资回报率先验,可以直观地将领域知识(例如过往实验结果)纳入到模型中,以帮助指导模型训练过程。
可以根据投资回报率实验结果设置特定于渠道的投资回报率先验,Meridian 将这种方式称为“校准”。即使没有实验结果,也能利用投资回报率先验。无论有哪些数据可作为参考依据,都建议使用投资回报率先验。
投资回报率先验可确保有效系数先验的规模与每个渠道的支出相匹配。大众往往认为系数先验是更好的无信息先验,但事实并非如此。如果对所有渠道使用相同的无信息系数先验,那么实际上是在对这些渠道设置截然不同且可能相差几个数量级的投资回报率先验。
在设置投资回报率先验时,请注意以下重要事项:
没有可将实验结果转换为先验的特定公式。可以将实验的点估计值和标准误差与先验平均值和标准误差保持一致(请参阅根据过往实验设置自定义先验中的示例)。不过,贝叶斯理论中先验知识的定义更为广泛,并且不需要进行公式化计算。通过将其他领域知识与实验结果相结合,可以从主观上设置先验。
Meridian 的默认投资回报率先验分布是对数正态分布。之所以选择此分布作为默认分布,是因为它具有两个形参,可控制平均值和标准差。不过,可以使用任何具有任意数量形参的分布来代替对数正态分布。一般来说,不建议使用投资回报率负值,因为这可能会使后验方差虚增,并导致过拟合。
通过实验衡量出的投资回报率与通过营销组合建模分析 (MMM) 衡量出的投资回报率永远不会完全一致(从统计学角度来说,实验和 MMM 会得出不同的被估量。)实验结果总是与实验的特定条件相关,例如时间范围、地理位置区域、广告系列设置。从实验结果中可以获得与 MMM 得出的投资回报率高度相关的信息,但将实验结果转换为 MMM 先验不仅牵涉到实验的标准误差,还涉及到额外的不确定性因素。
设置先验分布(尤其是先验标准差)时:
考虑到通常需要进行一定程度的正则化来实现合适的偏差-方差权衡。虽然一些建模者可能倾向于对没有先验实验的渠道使用扁平的无信息先验,但这可能会导致过度拟合和不好的结果(偏差低但方差高)。
确定合适的正则化程度可能是一个迭代过程,这包括在各种正则化强度下检查样本外模型拟合度。纯粹贝叶斯主义者可能会反对这种做法,因为后验分布无法提供明确的解释,除非先验分布精确反映了先验知识。尽管如此,这种方法对于 MMM 来说也并不一定实用。此外,获取领域知识并为模型中的每个形参设置真实先验是不切实际的,因此应该对贝叶斯推断进行相应解释。
如需了解详情,请参阅以下内容:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-04。
[null,null,["最后更新时间 (UTC):2025-08-04。"],[[["\u003cp\u003eROI priors allow you to incorporate domain knowledge, like past experiment results, to guide model training and improve accuracy.\u003c/p\u003e\n"],["\u003cp\u003eMeridian's calibration process uses channel-specific ROI priors, ideally informed by experiment results but not strictly required.\u003c/p\u003e\n"],["\u003cp\u003eWhile experiment results offer valuable insights for setting ROI priors, they should be interpreted cautiously, considering the inherent differences between experimental and MMM measurements.\u003c/p\u003e\n"],["\u003cp\u003eFinding the optimal level of regularization for your model often involves an iterative process to balance bias and variance, even if it deviates from a purely Bayesian approach.\u003c/p\u003e\n"],["\u003cp\u003eThe default Log-normal distribution for ROI priors is recommended, but other distributions can be used as long as they avoid negative ROI values to prevent overfitting.\u003c/p\u003e\n"]]],["ROI priors incorporate domain knowledge into model training, ideally using past experiment results for channel-specific *calibration*. Though, experiment data isn't mandatory for setting priors. The default log-normal distribution is recommended, avoiding negative values. Translating experiment outcomes to MMM priors involves uncertainty, as experiments don't perfectly align with MMM ROI. Setting priors, especially standard deviations, requires regularization to avoid overfitting. The degree of regularization may require iteration.\n"],null,["# ROI priors and calibration\n\nROI priors offer an intuitive way to incorporate domain knowledge, such as past\nexperiment results, into your model to help guide the model training process.\n\nWhen ROI experiment results are used to set channel-specific ROI priors,\nMeridian refers to this as *calibration*. It isn't necessary to have\nexperiment results in order to utilize ROI priors. ROI priors are the recommended\napproach regardless of what data is available to inform them.\n\nROI priors ensure that the effective coefficient prior is on a scale that is\nappropriate relative to the spend for each channel. It can be tempting to think\nthat coefficient priors make better non-informative priors, but this isn't the\ncase. If you use the same non-informative coefficient prior on all channels, you\nare effectively placing very different ROI priors on these channels that could\ndiffer by orders of magnitude.\n\nHere are some important considerations when setting ROI priors:\n\n- There is no specific formula to translate an experiment result into a prior.\n One option is to align the experiment's point estimate and standard error with\n the prior mean and standard error (see an example in [Set custom priors using\n past experiments](/meridian/docs/advanced-modeling/set-custom-priors-past-experiments)).\n However, prior knowledge in the Bayesian sense is more broadly defined, and\n doesn't need to be a formulaic calculation. Other domain knowledge can be used\n in combination with experiment results to subjectively set the priors.\n\n- Meridian's default ROI prior distribution is Log-normal. This\n distribution was chosen as the default because it has two parameters, which\n gives control over both the mean and standard deviation. However, any\n distribution with any number of parameters can be used in place of\n Log-normal. Generally, it's not recommended to allow negative ROI values\n because this can inflate the posterior variance and lead to overfitting.\n\n- The ROI measured by an experiment never aligns perfectly with the ROI measured\n by MMM. (In statistical terms, the experiment and MMM have different\n estimands.) Experiments are always related to the specific conditions of the\n experiment, such as the time window, geographic regions, campaign settings.\n Experiment results can provide highly relevant information about the MMM ROI,\n but translating experiment results to an MMM prior involves an additional\n layer of uncertainty beyond only the experiment's standard error.\n\n- When setting prior distributions, and prior standard deviations in particular:\n\n - Consider that some degree of regularization is typically necessary to\n achieve a suitable bias-variance tradeoff. Although some modelers might be\n inclined to use flat, noninformative priors for channels with no prior\n experiments, this can lead to overfitting and poor results (low bias but\n high variance).\n\n - Finding an appropriate degree of regularization can be an iterative process\n that involves checking out-of-sample model fit at various regularization\n strengths. Bayesian purists might argue against this because the posterior\n distribution doesn't have a clear interpretation unless the prior\n distribution precisely reflects prior knowledge. Although this is true, such\n an approach is not necessarily practical for MMM. Furthermore, it is\n infeasible to obtain domain knowledge and set a true prior on every single\n parameter in the model, and Bayesian inference should be interpreted\n accordingly.\n\nFor more information, see:\n\n- [ROI priors](/meridian/docs/advanced-modeling/roi-priors-and-calibration) for technical details.\n- [Tune the ROI calibration](/meridian/docs/user-guide/configure-model#tune-roi-calibration) for how to set ROI priors based on experiment results.\n- [Set the ROI calibration period](/meridian/docs/user-guide/configure-model#set-roi-calibration-period) for using the `roi_calibration_period` argument to apply your ROI prior to a narrower time window."]]