meridian.analysis.optimizer.get_optimization_bounds

Get optimization bounds from spend and spend constraints.

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).

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.