meridian.analysis.visualizer.ReachAndFrequency
Stay organized with collections
Save and categorize content based on your preferences.
Generates reach and frequency plots for the Meridian model.
meridian.analysis.visualizer.ReachAndFrequency(
meridian: meridian.model.model.Meridian,
selected_times: (Sequence[str] | None) = None,
use_kpi: bool = False
)
Plots the ROI by frequency for reach and frequency (RF) channels.
Args |
meridian
|
Media mix model with the raw data from the model fitting.
|
selected_times
|
Optional list containing a subset of times to include. By
default, all time periods are included.
|
use_kpi
|
If True, KPI is used instead of revenue.
|
Attributes |
optimal_frequency_data
|
Dataset holding the calculated optimal reach and frequency metrics.
The dataset contains the following:
- Coordinates:
frequency, rf_channel, metric (mean, ci_hi,
ci_lo)
- Data variables:
roi, optimal_frequency
|
Methods
plot_optimal_frequency
View source
plot_optimal_frequency(
selected_channels: (list[str] | None) = None
)
Plots the optimal frequency curves for selected channels.
| Args |
selected_channels
|
Optional list of RF channels to plot.
|
| Returns |
|
A faceted Altair plot showing a curve of the optimal frequency for the
RF channels.
|
update_optimal_reach_and_frequency_selected_times
View source
update_optimal_reach_and_frequency_selected_times(
selected_times: (Sequence[str] | None) = None
)
Updates the selected times for optimal reach and frequency data.
| Args |
selected_times
|
Optional list containing a subset of times to include. By
default, all time periods are included.
|
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."],[],[]]