Join the newly launched
Discord community for real-time discussions, peer support, and direct interaction with the Meridian team!
schema.processors.marketing_processor.MediaSummarySpec
Stay organized with collections
Save and categorize content based on your preferences.
Stores parameters needed for creating media summary metrics.
schema.processors.marketing_processor.MediaSummarySpec(
aggregate_times: bool = True,
marginal_roi_by_reach: bool = True,
include_non_paid_channels: bool = False,
new_data: (analyzer.DataTensors | None) = None,
media_selected_times: (Sequence[bool] | None) = None
)
Attributes |
aggregate_times
|
Boolean. If True, the media summary metrics are
aggregated over time. Defaults to True.
|
marginal_roi_by_reach
|
Boolean. Marginal ROI (mROI) is defined as the return
on the next dollar spent. If this argument is True, the assumption is
that the next dollar spent only impacts reach, holding frequency constant.
If this argument is False, the assumption is that the next dollar spent
only impacts frequency, holding reach constant. Defaults to True.
|
include_non_paid_channels
|
Boolean. If True, the media summary metrics
include non-paid channels. Defaults to False.
|
new_data
|
Optional DataTensors container with optional tensors: media,
reach, frequency, organic_media, organic_reach,
organic_frequency, non_media_treatments and revenue_per_kpi. If
None, the metrics are calculated using the InputData provided to the
Meridian object. If new_data is provided, the metrics are calculated
using the new tensors in new_data and the original values of the
remaining tensors.
|
media_selected_times
|
Optional list containing booleans with length equal to
the number of time periods in new_data, if provided. If new_data is
provided, media_selected_times can select any subset of time periods in
new_data. If new_data is not provided, media_selected_times selects
from model's original media data.
|
Methods
validate
View source
validate()
Checks whether each parameter in the Spec has a valid value.
| Raises |
ValueError
|
If any parameter in the Spec has an invalid value.
|
__eq__
__eq__(
other
)
Return self==value.
Class Variables |
|
aggregate_times
|
True
|
|
include_non_paid_channels
|
False
|
|
marginal_roi_by_reach
|
True
|
|
media_selected_times
|
None
|
|
new_data
|
None
|
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-12-09 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-12-09 UTC."],[],[]]