新しく開設された
Discord コミュニティに参加して、リアルタイムのディスカッション、ユーザー同士のサポート、メリディアン チームとの直接の交流をお楽しみください。
max_lag パラメータを設定する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Meridian モデルでは、時間 \(t\) のメディアが時間 \(t, t + 1, \dots , t + L\) の KPI に影響を与える可能性があります。ここで、整数 \(L\) は、ModelSpec
の max_lag
を使用してユーザーが設定するハイパーパラメータです。メディア効果は、max_lag
を超える長期に及ぶ場合があります。ただし、遅延があるメディア効果は、モデルが幾何級数的な減衰を仮定しているため、0 に収束します。
実際には、max_lag
を使用してメディア効果が及ぶ期間を短縮します。これは、モデルの収束の改善、モデルのランタイムの合理化、データ使用量の最大化(分散の低減)などのメリットがあるためです。max_lag
を 2~10 の範囲に保つと、こうしたメリットとデメリットのバランスをとることができます。
max_lag
を増やしても、費用対効果(ROI)の推定値も高まるとは限りません。その理由としては、時間 \(t\)のメディアが時間 \(t+L\)の KPI に影響を与える場合、時間 \(t+1, \dots , t+L\) のメディアが時間 \(t+L\)の KPI に及ぼす効果が損なわれる可能性があることが挙げられます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-04 UTC。
[null,null,["最終更新日 2025-08-04 UTC。"],[[["\u003cp\u003eThe Meridian model assumes media impact on KPIs can extend over a period, defined by \u003ccode\u003emax_lag\u003c/code\u003e, with the effect diminishing over time due to geometric decay.\u003c/p\u003e\n"],["\u003cp\u003eWhile media impact can theoretically last longer than \u003ccode\u003emax_lag\u003c/code\u003e, it's truncated for practical reasons like model convergence, runtime, and data utilization.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003emax_lag\u003c/code\u003e value between 2 and 10 generally provides an optimal balance between model performance and efficiency.\u003c/p\u003e\n"],["\u003cp\u003eIncreasing \u003ccode\u003emax_lag\u003c/code\u003e might not result in higher ROI estimates, as it can redistribute the attributed impact across different media exposures over time.\u003c/p\u003e\n"]]],[],null,["The Meridian model allows for media at time \\\\(t\\\\) to affect the KPI at times\n\\\\(t, t + 1, \\\\dots , t + L\\\\) where the integer \\\\(L\\\\) is a hyperparameter set\nby the user using the `max_lag` parameter of `ModelSpec`. Media can potentially\nhave a long effect that goes beyond `max_lag`. However, Meridian assumes lagged\neffects decay monotonically toward zero and these effects eventually become\nsmall. For practical reasons, we truncate the effect at the `max_lag` value.\n\n`max_lag` tradeoffs\n\nSmaller values of `max_lag` generally lead to improved model convergence and\nfaster model model runtimes. Smaller values of `max_lag` can also reduce model\nvariance: with large `max_lag` values, the amount of data available is often\ninsufficient for Meridian models to precisely estimate lagged effects,\nincreasing model variance. On the other hand, larger values of `max_lag`\nincrease the duration of lagged effects which can be beneficial for models that\nexpect long term effects.\n\nIncreasing `max_lag` doesn't necessarily mean that ROI estimates will also\nincrease. One reason for this is because if the media at time \\\\(t\\\\) can affect\nthe KPI at time \\\\(t+L\\\\), this can take away from the effect of media at times\n\\\\(t+1, \\\\dots , t+L\\\\) on the KPI at time \\\\(t+L\\\\).\n\nPractical advice for setting `max_lag`\n\nThe two adstock decay functions offered in Meridian, geometric and binomial,\nbalance `max_lag` tradeoffs differently.\n\nWhen using geometric decay\n\nWith geometric decay, setting `max_lag` in the 2-10 range leads to a good\nbalance of modeling the lagged effects of media while minimizing the potential\ndisadvantages of a max lag that is too large. The geometric decay curve decays\nto zero very quickly for most values of \\\\(\\\\alpha\\\\), so setting `max_lag` to\na very large value has a negligible effect on the model likelihood.\n\nWhen using binomial decay\n\nWith binomial decay, however, the curve is a function of the max lag: it is\nstretched to cover the effect window as its x-intercept is always at\n\\\\(L + 1\\\\). As a result, the concern of diminishing returns no longer applies\nand you can use binomial decay with a larger value of `max_lag`. However,\nconvergence and model runtimes can still become worse with increasing `max_lag`.\nThis tension should be balanced with potential benefits of increasing `max_lag`,\nand we recommend selecting a `max_lag` value in the 4-20 range in this case.\n\nWhen using a combination of geometric and binomial\n\nDeciding on increasing the value of `max_lag` can be complicated if you are\nusing different decay functions for different channels. If you are predominantly\nusing one function with a small number of exceptions we recommend following the\nrecommendation of the predominant function. If you are using a more balanced\nmix, we recommend selecting a `max_lag` in the 4-20 range. This gives a good\nbalance of binomial lagged effect modeling while avoiding the drawbacks of using\ngeometric with a large `max_lag`.\n\n| Adstock Decay Function | Max Lag Recommendation |\n|--------------------------------|------------------------|\n| Geometric | 2-10 time periods. |\n| Binomial | 4-20 time periods. |\n| Geometric/Binomial Combination | 4-20 time periods. |\n\nFor additional details on the decay functions and alpha prior, see\n[Set the adstock_decay_spec parameter](/meridian/docs/advanced-modeling/set-adstock-decay-spec-parameter)."]]