Participe da nova comunidade do
Discord para discussões em tempo real, suporte de colegas e interação direta com a equipe do Meridian.
Saturação e atraso de mídia
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Normalmente, o efeito de um canal de mídia nas vendas tem um atraso que diminui lentamente ao longo do tempo. A arquitetura de modelo do Meridian foi projetada para capturar esse efeito usando uma função de decaimento geométrico de Adstock. Para mais informações, consulte A Hierarchical Bayesian Approach to Improve Media Mix Models Using Category Data e Bayesian Methods for Media Mix Modeling with Carryover and Shape Effects.
Função de Adstock
Essa função é definida da seguinte forma:
$$
\text{AdStock}(x_t, x_{t-1}, \cdots, x_{t-L};\ \alpha)\ =
\dfrac{\sum\limits_{s=0}^L\ \alpha^sx_{t-s}}
{\sum\limits _{s=0}^L\ \alpha^s}
$$
Em que:
\(x_s \geq 0; s = t, t-1, \cdots, t-L\)
\(\alpha\ \in\ [0, 1]\) é a taxa de decaimento geométrico
\(L\) é a duração máxima do atraso
Também é intuitivo que, à medida que os gastos em um determinado canal de mídia em um período específico aumentam, os retornos marginais diminuam, por exemplo, saturação. O Meridian modela esse efeito de saturação usando uma função de dois parâmetros conhecida como função de Hill.
Função de Hill
Essa função é definida da seguinte forma:
$$
\text{Hill}(x; ec, \text{slope}) = \frac{1}{1+\left( \frac{x}{ec} \right)^
{- \text{slope}}}
$$
Em que:
\(x \geq 0\)
\(ec > 0\) é o ponto de meia saturação, ou seja,\(\text{Hill}(x=ec; ec, \text{slope}) = 0.5\)
\(\text{slope} > 0\) é um parâmetro que controla o formato da função:
- \(\text{slope} \leq 1\) corresponde a um formato côncavo
- \(\text{slope} > 1\) corresponde a uma função em formato S que é convexa para \( x < ec \) e côncava para \( x > ec \)
Importante: a estimação do modelo dos parâmetros da função Hill é baseada no intervalo observado dos dados de mídia. A curva de resposta ajustada pode ser extrapolada fora desse intervalo, mas os resultados dessa ação precisam ser interpretados com cautela.
A função de Hill pode ser aplicada antes ou depois da transformação de Adstock, dependendo do argumento booleano hill_before_adstock
de ModelSpec
. A configuração padrão é hill_before_adstock = False
, que faz com que o efeito de mídia do canal \(m\) dentro da região \(g\) e do período \(t\)seja igual a\(\beta_{g,m} \text{Hill}(\text{Adstock}(x_t,x_{t-1},\cdots,x_{t-L};\ \alpha_m)
;ec_m, \text{slope}_m)\).
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-08-04 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-04 UTC."],[[["\u003cp\u003eMeridian utilizes an Adstock function to model the lagged and tapering effects of media channels on sales.\u003c/p\u003e\n"],["\u003cp\u003eThe Hill function is employed to capture the diminishing marginal returns, or saturation, of media spending.\u003c/p\u003e\n"],["\u003cp\u003eThe Hill function can be applied before or after the Adstock transformation, offering flexibility in modeling media effects.\u003c/p\u003e\n"],["\u003cp\u003eThe model estimates parameters based on observed data, and extrapolation beyond this range requires caution in interpretation.\u003c/p\u003e\n"],["\u003cp\u003eDetails on the Adstock and Hill functions, including formulas and parameter explanations, are provided within the content.\u003c/p\u003e\n"]]],["Meridian's model captures the lagged effect of media on sales using a geometric decay Adstock function, defined by decay rate (α) and maximum lag (L). It also accounts for diminishing returns through the Hill function, characterized by half saturation point (ec) and slope. The Hill function can be applied before or after the Adstock transformation, defaulting to after. The model estimates Hill function parameters based on the observed media data range.\n"],null,["The effects of media execution on KPI are governed by two mechanisms: a lagged\neffect and a saturation effect. Lagged effects refer to the way in which the\neffect of a media channel on KPI has a lagged effect that tapers off slowly\nover time. Saturation effects refer to diminishing marginal returns with\nincreased media execution.\n\nAdstock function\n\nMeridian's model architecture is designed to capture lagged effects\nthrough an Adstock function.\n\nIn the Adstock function, the cumulative media effect at time \\\\(t\\\\) is a\nweighted average of media execution at times \\\\(t, t-1, ..., t-L\\\\) with weights\ndetermined by a weight function \\\\(w(s; \\\\alpha)\\\\). Here, \\\\(L\\\\) is the maximum\nduration of the lagged effect.\n\nMeridian offers the Adstock function with two weight functions\n\\\\(w(s; \\\\alpha)\\\\): `geometric` and `binomial`. For more details on the\nfunctions, see [Set the adstock_decay_spec\nparameter](/meridian/docs/advanced-modeling/set-adstock-decay-spec-parameter).\nFor more information on the Adstock function, see [A Hierarchical Bayesian\nApproach to Improve Media Mix Models Using Category\nData](//research.google/pubs/a-hierarchical-bayesian-approach-to-improve-media-mix-models-using-category-data/)\nand [Bayesian Methods for Media Mix Modeling with Carryover and Shape\nEffects](//research.google/pubs/bayesian-methods-for-media-mix-modeling-with-carryover-and-shape-effects/).\n\nThe Adstock function is defined as follows: \n$$ \\\\text{Adstock}(x_t, x_{t-1}, \\\\cdots, x_{t-L};\\\\ \\\\alpha)\\\\ = \\\\dfrac{\\\\sum\\\\limits_{s=0}\\^L\\\\ w(s; \\\\alpha)x_{t-s}} {\\\\sum\\\\limits _{s=0}\\^L\\\\ w(s; \\\\alpha)} $$\n\nwhere:\n\n- \\\\(w(s; \\\\alpha) \\\\) is the [decay function](/meridian/docs/advanced-modeling/set-adstock-decay-spec-parameter)\n\n- \\\\(x_s \\\\geq 0\\\\) is media execution at time \\\\(s\\\\)\n\n- \\\\(\\\\alpha\\\\ \\\\in\\\\ \\[0, 1\\]\\\\) is the decay parameter\n\n- \\\\(L\\\\) is the maximum lag duration.\n\nHill function\n\nMeridian's model architecture is designed to capture saturation effects\nthrough a Hill function.\n\nIt is intuitive that as spending on a given media channel within any given\ntime period increases, you eventually see diminishing marginal returns, for\nexample, saturation. Meridian models this\nsaturation effect through a two-parameter function known as the Hill function.\n\nThe Hill function is defined as follows: \n$$ \\\\text{Hill}(x; ec, \\\\text{slope}) = \\\\frac{1}{1+\\\\left( \\\\frac{x}{ec} \\\\right)\\^ {- \\\\text{slope}}} $$\n\nwhere:\n\n- \\\\(x \\\\geq 0\\\\)\n\n- \\\\(ec \\\u003e 0\\\\) is the half saturation point, meaning that \\\\(\\\\text{Hill}(x=ec;\n ec, \\\\text{slope}) = 0.5\\\\)\n\n- \\\\(\\\\text{slope} \\\u003e 0\\\\) is a parameter that controls the function shape:\n\n - \\\\(\\\\text{slope} \\\\leq 1\\\\) corresponds to a concave shape\n - \\\\(\\\\text{slope} \\\u003e 1\\\\) corresponds to an *S* shaped function that is convex for \\\\( x \\\u003c ec \\\\) and concave for \\\\( x \\\u003e ec \\\\).\n\n**Important:** The model's estimation of the Hill function parameters is based\non the observed range of media data. The fitted response curve can be\nextrapolated outside this range, but results based on extrapolation should be\ninterpreted with an appropriate level of caution.\n\nThe Hill function can be applied either before or after the Adstock\ntransformation, depending on the boolean `hill_before_adstock` argument of the\n`ModelSpec`. The default setting is `hill_before_adstock = False`, which makes\nthe media effect of channel \\\\(m\\\\) within geo \\\\(g\\\\) and time period \\\\(t\\\\)\nequal to \\\\(\\\\beta_{g,m} \\\\text{Hill}(\\\\text{Adstock}(x_t,x_{t-1},\\\\cdots,x_{t-L};\\\\\n\\\\alpha_m) ;ec_m, \\\\text{slope}_m)\\\\)."]]