Data Science, Causal Inference, Machine Learning, Optimization, Notes From Industry.
objective function — We want to maximise orders but as we are going to use a minimisation method, we return the negative of the sum of orders expected. def objective_function(x, products, parameters): sum_orders = 0.0 # Unpack parameters for each product and calculate expected orders for product,