A. Optimization

The Master’s of Management of Artificial Intelligence (MMAI) programme at Queen’s University starts its students technical training with MMAI861. It seems to serve two purposes: Presenting management tools to assist decision-making and back up decisions Giving a soft entry to mind-boggling mathematic concepts that hit the non-mathematician like yours truly later in the programme.

The Master’s of Management of Artificial Intelligence (MMAI) programme at Queen’s University starts its students technical training with MMAI861. It seems to serve two purposes:

The main points of the course are:

These posts are my aide-memoires. They do not replace the course slides1, but present some additional notes that may help understand the theory behind the techniques. For example, System 1 and System 2 decision processes do not need any explanation. Biases and fallacies are likewise easy to grasp.

What isn’t easy…

A. Optimization

A.1. Optimization Terms

A.2. Optimization: LP Model for Business

Take the linear equation Z = Ax + By + C. The objective function is the whole statement. x, y, and z are the decision variables. A, B and C are the constants, coefficients that determine the strength of each decision variable. Constraints are max or min function applied to each component. In a facetious, coffee optimization problem: if x is the number of sugar cubes in an series of cups of coffee, then two constraints could be, “you cannot have a negative number of sugar cubes per cup, and there are only 12000 cubes in the inventory.”

Part of optimizing is identifying the objective function, decision variables, and constraints verbally from a business problem. By the way, later on when dealing with loss functions in ML, know that objective functions and loss functions are the same thing.

A.2.1 LP Suitability

Linear Programming assumes the problem is (moderately) simple: a single objective, data certainty, proportionality, additivity and divisibility. If any of the above characteristics are violated, then LP cannot be used.

A.2.2 LP Graphical Solutions

Demonstrates how Excel (for example) go about setting the decision variables.

The visual method of optimization is restricted to LP models with two (maybe three) decision variables. Obviously, non-visual may use more than three.

Excel Solver uses the Simplex Method to search through the feasible region. One Python equivalent could be scipy.optimize.linprog()

Some folks have pretty well had it with Excel. Python has several LP solver packages available. See How to create your first linear programming solver in Python.

A.3. Sensitivity Analysis for LP

Once the decision variables have been optimized, one runs a sensitivity analysis to explore further options for the business.

According to Investopedia, Sensitivity Analysis determines how different values of a decision variable affect the objective function under a given set of assumptions. It is used for “what-if” conversations. Messing around with the constraints is fun!

Definitions:

A.4. Integer Programming

Integer Programming is LP with the constraint that one or more decision variables are restricted to integers, including binary {0,1} integers. A factory may need to deliver a number of boxes of product to several outlets. A machine at the factory may be used or unused (1,0) – a fixed-cost model.

See Joshua Emmanuel’s YouTube video for examples of integer programming with binary constraints.

Of note: binary constraints are a mathematical version of an “if” statement.

Next: Math for simulations 1


  1. For the love of mercy, download the slides for future reference and go through the exercises. ↩︎

  2. Wikipedia. Dynamic decision-making ↩︎

  3. Statistics HowTo Discrete vs Continuous Variables ↩︎

  4. Silvia Valcheva. Discrete vs Continuous Data Intellspot. ↩︎