Rejoignez la nouvelle communauté
Discord pour discuter en temps réel, obtenir l'aide de vos pairs et communiquer directement avec l'équipe Meridian.
Définir le paramètre max_lag
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Le modèle Meridian permet aux médias à l'instant \(t\) d'affecter le KPI aux instants \(t, t + 1, \dots , t + L\) , où l'entier \(L\) est un hyperparamètre défini par l'utilisateur à l'aide du max_lag
de ModelSpec
. Le média peut avoir un effet durable qui peut se prolonger au-delà de max_lag
. Toutefois, l'effet média différé converge vers zéro, en raison de l'hypothèse de régression géométrique du modèle.
En pratique, max_lag
est utilisé pour limiter la durée pendant laquelle le média peut avoir un effet, car il présente des avantages tels que l'amélioration de la convergence du modèle, des durées d'exécution raisonnables et une utilisation maximale des données (réduction de la variance). Le maintien de max_lag
dans la plage de 2 à 10 permet d'obtenir un bon équilibre entre ces avantages et inconvénients.
L'augmentation de max_lag
ne signifie pas nécessairement que les estimations du ROI augmenteront également. En effet, si le média à l'instant \(t\)peut affecter le KPI à l'instant \(t+L\), cela peut nuire à l'effet média à l'instant \(t+1, \dots , t+L\) sur le KPI à l'instant \(t+L\).
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/04 (UTC).
[null,null,["Dernière mise à jour le 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)."]]