Data Science, Causal Inference, Machine Learning, Optimization, Notes From Industry.
product, budget in zip(products, result.x, strict=False)} print(f'Optimal promo budget allocations: {optimal_treatment}') print(f'Optimal orders: {round(result.fun * -1, 2)}') The output shows us what the optimal promotional budget is for each product: User generated image If you closely inspect