schema.processors.budget_optimization_processor.BudgetOptimizationSpec

Spec dataclass for marketing budget optimization processor.

Inherits From: OptimizationSpec, DatedSpec

This spec is used both as user input to inform the budget optimization processor of its constraints and parameters, as well as an output structure that is serializable to a BudgetOptimizationSpec proto. The latter serves as a metadata embedded in a BudgetOptimizationResult.

objective Always defined as KPI.
scenario The optimization scenario (whether fixed or flexible).
constraints Per-channel budget constraints. Defaults to relative constraints [1, 2] for spend_constraint_lower and spend_constraint_upper if not specified.
kpi_type A common.KpiType enum denoting whether the optimized KPI is of a 'revenue' or 'non-revenue' type.
grid The optimization grid to use for the optimization. If None, a new grid will be created within the optimizer.
include_response_curves Whether to include response curves in the output. Setting this to False improves performance if only optimization result is needed.
new_data The new data to use for the optimization. If None, the training data will be used.
use_optimal_frequency Whether to use the optimal frequency. If set to False, max_frequency is ignored.
max_frequency The max frequency to use for the optimal frequency search space. If not set when use_optimal_frequency is set to True, the max frequency of the input data is used.
start_date Dataclass field
end_date Dataclass field
date_interval_tag Dataclass field
optimization_name Dataclass field
grid_name Dataclass field
group_id Dataclass field
confidence_level Dataclass field

Methods

resolver

View source

Returns a date resolver for this spec, with the given Meridian model.

to_proto

View source

validate

View source

Check optimization parameters are valid.

__eq__

Return self==value.

confidence_level 0.9
date_interval_tag ''
end_date None
grid None
group_id None
include_response_curves True
kpi_type <KpiType.REVENUE: 2>
max_frequency None
new_data None
start_date None
use_optimal_frequency True