DO for DSX: How?

DO for DSX: How?

This article is the third one of a series. First, I introduced what were the main features from DO for DSX, adding Decision Optimization to the Data Science Experience platform. Then I explained why Decision Optimization complements other data science and machine learning techniques and why real "what to do next" insights and decisions requires these techniques. In this last part, I will detail how DO for DSX can be used, in practice, on a practical example, to develop, debug and deploy applications which requires different set of data science techniques, including Decision Optimization.

The practical case

I will use the use case I described in the why section: campaign marketing optimization. This is a good example, as it is often used to illustrate machine learning techniques. A company has different products which can be promoted to customers. Depending on customers characteristics (income, age, number of currently subscribed products, etc), their response to a promotional email, or a phone call will be different. The company can train machine learning models, based on historical data (how previous customers responded to such promotional actions) to predict what would be the response of these new customers with respect to different campaigns. As a result, the company can predict the expected revenue for each combination of customer and possible campaign as shown in my previous post.

When such example is used to illustrate machine learning, the story ends here. But what to do with such insights? In practice, the company will also consider different channels to promote products, with a limited capacity to run campaigns, a maximum budget, a maximum number of customers per campaigns and/or channels, some balance objective between the different campaigns, channels or geographies, etc.

This is not possible to decide which customer to contact for which campaigns through which channel, only considering machine learning outcome. Additional constraints and objectives needs to be formulated using a Decision Optimization model which will be run with the new sets of customers, campaigns and channels, along with the expected revenue obtained from machine learning. Decision Optimization will then provide the optimal subset of actions that should be executed in practice, taking into accounts expected revenues, constraints and objectives.

All steps required to build such application

The objective is to build a production application where a Line of Business (LoB) user can load new customer data, get their predicted expected revenue for different campaigns and channels, and use these to compute the optimal set of customer/campaign/channel actions. The application should allow the LoB to consider different budgets and other limits and compare the alternatives.

The high level steps are:

  1. Clean and prepare the historical data so that it can be consumed by a machine learning model,
  2. Train, validate and deploy a predictive model,
  3. Formulate, validate and deploy an optimization model,
  4. Integrate the two deployed models in an application.


The slide below lists how each technical steps could be achieved within DO for DSX.

Clean and prepare historical data

From experience, the data scientist knows that the data for this project will come late, incomplete, unstructured and dirty. He will need to transform, structure and clean this data so that it can be consumed by the predictive and prescriptive models.

For machine learning, it is also sometimes very important to do some feature engineering. Indeed, with common predictive algorithms, the data scientist needs to structure the data around meaningful features with respect to the target to predict. This might need quite some work around the data.

In general, data will also have to be cleaned and transformed so that it can be consumed by predictive and prescriptive models.

For all that the data scientist can use python notebooks or the Data Refinery as shown below:

Train, validate and deploy a predictive model

I will not go into details here, as predictive model development and deployment in DSX is covered in many other posts. There are different ways to develop a machine learning model. A coder data scientist will probably use a notebook with scikit-learn or some other package, while a clicker data scientist will use the ML model builder for simple models or SPSS Modeler for more complex ones.

For example the ML model builder trains a model in a few simple steps including the following one where the targeted column to predict is selected.

In all cases, the resulting trained model can be deployed using the new DSXL 1.2 Model Management and Deployment (MMD) feature. In a few clicks, the model is deployed with dedicated resources as a micro service with its own API, easy to integrate in any kind of application.

Formulate, validate and deploy an optimization model

Let's detail more this part. For Decision Optimization, the model development and debug is bit more complex than with Machine Learning.

We might consider the following sub steps:

  1. Formulate the model using a notebook,
  2. Validate the model using dashboard to analyze solutions from multiple scenarios,
  3. Deploy the selected formulation of the model.

Formulate an Optimization Model with docplex.

One way to formulate the optimization model is to use the docplex python package. It offers all API required to formulate both mathematical or constraint programming models. Notebooks are a practical place to quickly write and test different approaches.

Note that in DO for DSX, an alternative to formulate optimization models is to use the modeling assistant. I do not cover this alternative here.

Use Decision Optimization model builder

While notebooks are practical to quickly start testing different approaches, some specific needs of Decision Optimization such as manipulating and comparing easily different scenarios are best supported with the decision optimization model builder.

The model builder is organized around four simple steps to import data, prepare data, formulate and run model, and preview solution.

Use dashboards

The model builder also includes a visual dashboard where input and output data can be easily displayed as tables or charts. Different widgets can be laid out over different pages, with editors to configure individual widgets. The dashboard can be shared with LoB who can easily understand the outcome of the model and validate it corresponds to business requirements.

Consider multiple scenarios

With Machine Learning, validation is usually limited to running the trained model with a fraction of historical data which has initially been put aside. With Decision Optimization, data scientist needs to create and use different sets of data (known as scenarios) to validate the model formulation behaves correctly on those. Sometimes, different formulations are also tested on the same scenario data.

In DO for DSX, a simple python API is provided to duplicate, modify and run multiple scenarios.

Scenario are then directly accessible form the model builder where solutions and KPIs can be easily compared in the dashboard.

The model development process iterates until LoB approves that some specific model can be deployed and integrated in the production application.

Deploy the model

At this point, DSX Model Management and Deployment is used to deploy the optimization model in the exact same way as other predictive models. Specific resources can be reserved for a given optimization model.

As a result, a specific URL is returned which will allow to easily integrate the optimization model in the production application.

Production application

The company can build production application using any technology. As an example, a simple NodeJS application can be created which will load corporate data and call predictive and prescriptive models as needed, using simple REST API calls to the deployed models.

The production application could then look like as follow with specific User Interface to display initial data, intermediate expected revenue, optimized decisions or KPIs from different alternative strategies.

DSX Local

With this series of articles, I hope I could illustrate why DSX Local, with the combination of DO, SPSS and Data Refinery, is the only platform which really provides all what is necessary to build and deploy a complete predictive and prescriptive application.

要查看或添加评论,请登录

Alain Chabrier的更多文章

  • Decision Optimization model builder now in beta on Watson Studio Public.

    Decision Optimization model builder now in beta on Watson Studio Public.

    The Decision Optimization model builder is now in closed beta on Watson Studio Public. The Model builder ease the…

    5 条评论
  • Expectations

    Expectations

    Lower your expectations, Better balance quality and fun at work. Ralentis un peu.

    1 条评论
  • Decision Optimization in IBM Cloud Private for Data

    Decision Optimization in IBM Cloud Private for Data

    You might have seen some announcements about "IBM Cloud Private for Data" being ranked #1 by #forrester in their latest…

  • Zoo, Buses and Kids

    Zoo, Buses and Kids

    We recently announced the availability of the beta of Decision Optimization in Watson Studio (See…

    2 条评论
  • Optimization model deployment

    Optimization model deployment

    Decision Optimization (DO) model development can still be a difficult task which most always requires an expert to be…

    1 条评论
  • OPL is back!

    OPL is back!

    Many Decision Optimization experts prefer to use a dedicated language to formulate optimization models. One of those is…

    11 条评论
  • The million queens problem

    The million queens problem

    In my last post I mentioned part of my family (kids, wife and even grand mother) to illustrate some Decision…

    4 条评论
  • (Artificial) Intelligence, which one?

    (Artificial) Intelligence, which one?

    After we had heard a lot of talking about Cognitive, then Data Science, then Machine Learning, the concept of…

    2 条评论
  • DO for DSX : Why?

    DO for DSX : Why?

    In a recent post, I introduced the major areas of functionality of our recent delivery of Decision Optimization for…

  • DO for DSX: what?

    DO for DSX: what?

    On March 28th, we have delivered the first release of Decision Optimization for Data Science Experience (DO for DSX)…

    3 条评论

社区洞察

其他会员也浏览了