Join the newly launched
Discord community for real-time discussions, peer support, and direct interaction with the Meridian team!
meridian.analysis.optimizer.get_optimization_bounds
Stay organized with collections
Save and categorize content based on your preferences.
Get optimization bounds from spend and spend constraints.
meridian.analysis.optimizer.get_optimization_bounds(
n_channels: int,
spend: np.ndarray,
round_factor: int,
spend_constraint_lower: _SpendConstraint,
spend_constraint_upper: _SpendConstraint
) -> tuple[np.ndarray, np.ndarray]
Args |
n_channels
|
Integer number of total channels.
|
spend
|
np.ndarray with size n_total_channels containing media-level spend
for all media and RF channels.
|
round_factor
|
Integer number of digits to round optimization bounds.
|
spend_constraint_lower
|
Numeric list of size n_total_channels or float
(same constraint for all media) indicating the lower bound of media-level
spend. The lower bound of media-level spend is (1 -
spend_constraint_lower) * budget * allocation) . The value must be between
0-1.
|
spend_constraint_upper
|
Numeric list of size n_total_channels or float
(same constraint for all media) indicating the upper bound of media-level
spend. The upper bound of media-level spend is (1 +
spend_constraint_upper) * budget * allocation) .
|
Returns |
lower_bound
|
np.ndarray of size n_total_channels containing the treated
lower bound spend for each media and RF channel.
|
upper_bound
|
np.ndarray of size n_total_channels containing the treated
upper bound spend for each media and RF channel.
|
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.
[null,null,["Last updated 2025-09-05 UTC."],[],[],null,[]]