Constraint#
- class pymc_marketing.mmm.constraints.Constraint(key, constraint_type, constraint_fun)[source]#
Represents a constraint for the BudgetOptimizer.
- Attributes:
- key (str): Identifier for the constraint.
- constraint_type (Literal[“eq”, “ineq”]): Type of the constraint (“eq” for equality, “ineq” for inequality).
- constraint_fun (Callable[[pt.TensorVariable, pt.TensorVariable, Any], pt.TensorVariable]):
Function that computes the symbolic constraint, taking
budgets_sym
,total_budget_sym
, andoptimizer
.
Methods
Constraint.__init__
(key, constraint_type, ...)