Decision Optimization, Available in Watson Studio

AlainChabrier
6 min readDec 7, 2018

--

Decision Optimization is now available in the Watson Studio ecosystem with a seamless integration of the CPLEX solvers in the Python runtime environment.

Decision Optimization in the Cloud

Watson Studio now provides everything you need to describe your data, gain insight, and make an optimal decision in the very same ecosystem.

Get started right away and learn how to make more intelligent marketing and targeting decisions.

What is Decision Optimization (DO)?

Decision Optimization is a subset of data science techniques frequently used for prescriptive analytics. Most documented data science use cases are dedicated to revealing or predicting unknown or future data that is not under your control.

Decision Optimization takes this further by using this learned information to help you to decide what action to take in situations where you do have control.

DO analyzes all the possible choices and provides you with the best option from a huge set of alternatives. For example, you do not know if a customer is about to unsubscribe (customer churn), or when an industrial asset might fail, but you can decide whether or not to offer a particular promotion to your customers, or decide to run maintenance plans for your assets. These decisions are under your control. They are, however, limited by business constraints — for example by the maximum promotional budget or by the maintenance crew size. Among all the possible decisions, some are preferred based on objectives you want to optimize. Decision Optimization prescribes which decision for you to take in such cases.

DO applies to virtually all industries. Example applications include well-known use cases, such as the optimization of supply chains, production planning and scheduling, but also portfolio optimization, predictive maintenance, electricity unit commitment, or even more surprising applications such as price optimization or shelf space optimization.

In Shelf Space Optimization, you want to optimize the placement of items on the shelf, taking into account physical constraints, the grouping of categories of items, and the minimal amounts of items to position. You want to maximize the expected sales according to the predicted expected revenue for each type of item, in each possible position.

Shelf Space Optimization

With Unit Commitment, you want to optimize the generation of electricity to cover the forecasted demand, taking into account the characteristics of the different types of units (minimum and maximum generation, time to ramp up or down, etc.). The objective is to minimize the cost of electricity generation, but you can also take into account the ecological aspects and minimize carbon dioxide emissions.

Unit Commitment

A simple use case

Imagine you have the opportunity to promote new products to your existing customers. You can decide which product (and only one) to offer to each of your customers.

You know the cost of running these promotions and Machine Learning has helped you identify the expected revenue from these customers according to their characteristics and using a model trained with historical data.

Supposing there is no limitation on the number of promotions, it is easy to select the optimal assignments: for each customer, promote the product with the highest expected revenue.

But, in real life, and even with a very small set of customers, some other limitations apply, and with a simple limit like “at most 3 customers per product”, it is already not so easy to find the highest expected revenue solution. In the industry, this problem is run with millions of customers and dozens of products.

Decision Optimization (beta) in Watson Studio.

The existing Python Jupyter runtime environments have been extended to include the Decision Optimization libraries. In practice, the docplex python package is pre-installed so that you can formulate optimization models and the native libraries are set so that you can solve these models. (see documentation)

In the default runtimes, you now can benefit from the Community Edition of CPLEX engines. The Community Edition is a limited version of the solving capabilities of CPLEX. You can solve models with up to 1000 constraints and decision variables and without any extra cost.

Beyond these limits, you can choose to use an environment with “Beta of DO” which includes the unlimited commercial edition of the CPLEX engines. This environment does not incur any additional charges during this beta phase.

Being available in the notebook environment, you can combine DO with a whole heap of other technologies, so that you can handle the steps before and after the actual DO phase: to access and process data and, after DO, to trigger further delivery of results or calls to other systems.

How to start?

Go to Watson Studio and create an IBM account to login if necessary.

Check out this short and simple video to see how.

Create a new standard project and in this project create a new notebook using the “Add to project” button.

In the “New notebook” screen choose a runtime Python 3.5 +Beta of DO.

New notebook

Note that you can configure other types of runtime and choose the size of your runtime.

A demonstration notebook is available.

In this notebook, first, import your candidate data as a pandas dataframe and extract the list of customers and campaigns.

You can then create the optimization model and solve it using the following steps:

  • import the docplex python package
  • create a new Decision Optimization Model
  • create a binary decision variable per possible assignment (customer — campaign)
  • create and add constraints
  • create objective
  • solve the model

You can then extract and display the optimal solution:

Combining DO with ML

In most cases, Decision Optimization will prescribe decisions to help you decide what to do next. In doing so, it will use business constraints and objectives along with your data. As you plan for the future (what to do right now, just afterward, tomorrow, or next year), part of the data will be unknown, and this is where machine learning and prescriptive analytics can be perfectly combined.

In the previous example, the expected revenue for each combination of customer and campaign is used. This can be extracted from historical data and by using a trained machine learning model.

With the integration of Decision Optimization in Watson Studio notebooks, it becomes very easy to combine such two technologies.

See for example, a more complete notebook for a similar problem which combines ML and Decision Optimization.

Another similar example of solving predictive maintenance problems is also available.

More notebook examples are available in the Watson Studio Community.

PS: since this post was written, Decision Optimization is now Generally Available in notebooks.

--

--

AlainChabrier

Former Decision Optimization Senior Technical Staff Member at IBM Opinions are my own and I do not work for any company anymore.