Join the newly launched Discord
community for real-time discussions, peer support, and direct interaction with the Meridian team!
meridian.model.adstock_hill.AdstockDecaySpec
Stay organized with collections
Save and categorize content based on your preferences.
Specification for each channel's adstock decay function.
meridian
.
model
.
adstock_hill
.
AdstockDecaySpec
(
media
:
(
str
|
Sequence
[
str
])
=
constants
.
GEOMETRIC_DECAY
,
rf
:
(
str
|
Sequence
[
str
])
=
constants
.
GEOMETRIC_DECAY
,
organic_media
:
(
str
|
Sequence
[
str
])
=
constants
.
GEOMETRIC_DECAY
,
organic_rf
:
(
str
|
Sequence
[
str
])
=
constants
.
GEOMETRIC_DECAY
)
This class contains the adstock decay function(s) to use for each channel
that the adstock transformation is applied to.
A string or sequence of strings specifying the adstock function(s)
to use for media channels.
A string or sequence of strings specifying the adstock function(s)
to use for reach and frequency channels.
A string or sequence of strings specifying the adstock
function(s) to use for organic media channels.
A string or sequence of strings specifying the adstock
function(s) to use for organic reach and frequency channels.
Methods
from_consistent_type
View source
@classmethod
from_consistent_type
(
consistent_decay_function
:
str
=
constants
.
GEOMETRIC_DECAY
)
->
'AdstockDecaySpec'
Create an AdstockDecaySpec
with the same decay function for all channels.
consistent_decay_function
A string denoting the adstock decay function
to use for all channels that the Adstock transformation is applied to.
ValueError
If consistent_decay_function
is not 'geometric' or
'binomial'.
__eq__
__eq__
(
other
)
Return self==value.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-05 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-05 UTC."],[],[],null,["\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/google/meridian/blob/v1.2.0/meridian/model/adstock_hill.py#L34-L90) |\n\nSpecification for each channel's adstock decay function. \n\n meridian.model.adstock_hill.AdstockDecaySpec(\n media: (str | Sequence[str]) = constants.GEOMETRIC_DECAY,\n rf: (str | Sequence[str]) = constants.GEOMETRIC_DECAY,\n organic_media: (str | Sequence[str]) = constants.GEOMETRIC_DECAY,\n organic_rf: (str | Sequence[str]) = constants.GEOMETRIC_DECAY\n )\n\nThis class contains the adstock decay function(s) to use for each channel\nthat the adstock transformation is applied to.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------|\n| `media` | A string or sequence of strings specifying the adstock function(s) to use for media channels. |\n| `rf` | A string or sequence of strings specifying the adstock function(s) to use for reach and frequency channels. |\n| `organic_media` | A string or sequence of strings specifying the adstock function(s) to use for organic media channels. |\n| `organic_rf` | A string or sequence of strings specifying the adstock function(s) to use for organic reach and frequency channels. |\n\n\u003cbr /\u003e\n\nMethods\n\n`from_consistent_type`\n\n[View source](https://github.com/google/meridian/blob/v1.2.0/meridian/model/adstock_hill.py#L57-L75) \n\n @classmethod\n from_consistent_type(\n consistent_decay_function: str = constants.GEOMETRIC_DECAY\n ) -\u003e 'AdstockDecaySpec'\n\nCreate an `AdstockDecaySpec` with the same decay function for all channels.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Arguments ||\n|-----------------------------|---------------------------------------------------------------------------------------------------------------------|\n| `consistent_decay_function` | A string denoting the adstock decay function to use for all channels that the Adstock transformation is applied to. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|--------------|------------------------------------------------------------------|\n| `ValueError` | If `consistent_decay_function` is not 'geometric' or 'binomial'. |\n\n\u003cbr /\u003e\n\n`__eq__` \n\n __eq__(\n other\n )\n\nReturn self==value.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Class Variables ||\n|---------------|---------------|\n| media | `'geometric'` |\n| organic_media | `'geometric'` |\n| organic_rf | `'geometric'` |\n| rf | `'geometric'` |\n\n\u003cbr /\u003e"]]