Advertisement

'A Gentle Introduction to Linear Programming in Python' - Bethany Poulin (Pyohio 2019)

'A Gentle Introduction to Linear Programming in Python' - Bethany Poulin (Pyohio 2019) Bethany Poulin



## What is Linear Programming

Linear programming is an optimization method with broad utility. Sadly the study of linear programming is often overlooked in favor of sexier machine learning algorithms by both practitioners and data science educators (both bootcamps and graduate programs). However, it is used extensively in many of the fields from which data science evolved and there are useful libraries in most of the major analytical languages. We will spend 5-10 minutes understanding linear programming in general before moving on to code



## Linear Programming in Python

In Python, the most common library is Pulp which we will use to look at two separate optimization problems, one to minimize and one to maximize a desired outcome variable.

We will go through:

System requirements

Package Installation

Computational Complexity (floating values & discrete number calculations)





## Real World Examples with Code

We will be setting up and completing the two problems. In doing so we will learn how to simplify a complex system into a series of linear equations.



We will learn about:

* Decision Variables - the outcomes we choose to optimize

* Objective Function - the series of relationships between decision variables which affect the optimization

* Constraints - the limits on our decision variables which allocate resources

* How to visualize the problem (it could be a graph or simple illustration)

* How to set up the equations defining the problem

* How to solve the series of equations

* How to interpret the results

* How to know when you can, should or should not use linear programming to solve a problem



The presentation will be assume a base understanding of python algebra and linear equations (y=mx+b) but it is not going to be presented in a mathematically demanding way. We will look at real-world resource allocation problems and use simple python code to solve them.



### Resources

There will be a fully fleshed out GITHUB repository with:

* The slides

* The code

* Brief instructional README.md with links to other useful online sources



Linear programming is a useful computational technique for finding minima or maxima of a complex system by breaking it into a series of linear equations which describe the systems. It has many practical applications in industry, medicine, agriculture and in retail environments. Together we will explore simple linear programming problems using Python and the module Pulp.

===





A FREE annual conference for anyone interested in Python in and around Ohio, the entire Midwest, maybe even the whole world.

Produced by NDV:

Sat Jul 27 14:00:00 2019 at Cartoon 2

pyohio,pyohio_2019,BethanyPoulin,

Post a Comment

0 Comments