留出观测结果(训练组和测试组划分)
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Meridian 模型规范包含一个 holdout_id
实参(维度为 \(G \times T\) 的布尔值数组),可用于指定留出样本。在模型训练(例如 MCMC 后验抽样)期间,留出观测结果的 KPI 数据会被忽略,它们不会影响模型的似然或后验密度。留出观测结果的媒体数据仍将用于模型训练,因为它们会影响后续时间段的 Adstock 媒体值。
留出样本的主要用途是计算样本外的拟合优度指标,例如 R 平方。这对于比较不同的模型规范(如先验分布强度)非常有用,前提是所比较的每个模型都使用相同的留出样本。我们并不保证样本外模型拟合度最好的模型就是因果推理的最佳模型,但一般来说,拟合度较高的模型更受青睐。导致模型拟合不佳的模型误设也可能会导致因果推理出现偏差。
我们建议使用一个在各个地理位置和时间段均相当平衡的留出样本。换句话说,这个留出样本应满足以下条件:对于每个地理位置和每个时间段,都具有大致相同的留出观测结果数量。如果留出样本失衡,就可能导致训练观测结果过少,无法估计某些地理位置的地理位置效应 \(\tau_g\),或某些时间段的时间效应 \(\mu_t\)。默认情况下,Meridian 不会指定留出样本。您必须指定留出样本,并确保该样本具有不错的平衡度。
避免留出时间上连续的大块数据(例如在营销组合建模分析 [MMM] 时间窗口结束时)来评估 KPI 的预测误差。Meridian 并非旨在预测 KPI,尤其是在 KPI 带有很强的趋势性和季节性的情况下。实际上,Meridian 会估计因果媒体影响,并使用基于结的方法对趋势和季节性变化进行模型分析。基于结的方法需要结附近的数据才能有效估计结。如果留出时间上连续的大块数据,则在留出的时间段内,结附近将没有数据。在这种情况下,结的后验分布会受到先验的影响,从而可能导致预测结果不佳。
此外,Meridian 还可用于估计历史媒体和未来媒体的影响力,因为它假定决定媒体影响力的模型形参在不同时期是一致的。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-31。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-12-31。"],[[["The Meridian model's `holdout_id` argument allows you to specify a holdout sample for calculating out-of-sample goodness of fit metrics, like R-squared, to compare different model specifications."],["While media data for holdout observations is used in training, their KPI data is excluded, ensuring the holdout sample doesn't influence model parameters."],["For optimal performance, use a balanced holdout sample across geos and time periods to ensure sufficient data for accurate model estimation."],["Avoid holding out large, continuous time chunks as Meridian focuses on causal impact estimation, not KPI forecasting, and requires data near knots for effective trend and seasonality modeling."],["Meridian can be used to estimate the impact of both past and future media due to its assumption of consistent media impact parameters over time."]]],["The `holdout_id` in the Meridian model defines a holdout sample, where KPI data is excluded from model training but media data is still used. This holdout is used to calculate out-of-sample fit metrics. It is recommended the holdout sample be balanced across geos and time periods. Avoid holding out large contiguous time blocks as this can negatively impact the estimation of knots, affecting model forecasting ability. Meridian can estimate the impact of both past and future media.\n"]]