Kubernetes with OpenShift World Tour: Get hands-on experience and build applications fast! Find a workshop!

Monitoring the model with Watson OpenScale

This code pattern is part of both the Getting started with IBM Cloud Pak for Data and the Getting started with Watson OpenScale learning paths.

Summary

In this code pattern, we’ll use German Credit data to train, create, and deploy a machine learning model using Watson Machine Learning on IBM Cloud Pak for Data. We’ll create a data mart for this model with Watson OpenScale and configure OpenScale to monitor that deployment. Next, we’ll inject seven days’ worth of historical records and measurements for viewing in the OpenScale Insights dashboard.

Description

The dataset used for this pattern contains information regarding credit applications from a variety of users. We can use a deep neural network to create a machine learning model using Watson Machine Learning and then deploy this model for use in predicting future risk of default. Because of the sensitive nature of credit scoring, this is an ideal use case for the on-premise solution offered by IBM Cloud Pak for Data.

The deployed ML model can now be monitored by Watson OpenScale. Continued use will generate data which allows administrators to ensure the quality of the model, and offer explanations as to what features of the dataset are most influential in creating the Risk scoring. Bias detection will be configured to allow further insight into the fairness of the model predictions. All of this information is available in the OpenScale dashboard and in great detail.

After completing this code pattern, you’ll understand how to:

  • Create and deploy a machine learning model using the Watson Machine Learning service on IBM Cloud Pak for Data.
  • Setup Watson OpenScale Data Mart.
  • Bind Watson Machine Learning to the Watson OpenScale Data Mart.
  • Add subscriptions to the Data Mart.
  • Enable payload logging and performance monitor for subscribed assets.
  • Enable quality (accuracy) monitor.
  • Enable fairness monitor.
  • Score the German credit model using the Watson Machine Learning.
  • Insert historic payloads, fairness metrics, and quality metrics into the Data Mart.
  • Use Data Mart to access tables data via subscription.

Flow

flow

  1. The developer creates a Jupyter Notebook on IBM Cloud Pak for Data.
  2. OpenScale on IBM Cloud Pak for Data is connected to a DB2 database, which is used to store Watson OpenScale data.
  3. The notebook is connected to Watson Machine Learning and a model is trained and deployed.
  4. Watson OpenScale is used by the notebook to log payload and monitor performance, quality, and fairness.
  5. OpenScale will monitor the Watson Machine Learning model for performance, fairness, quality, and explainability.

Instructions

Ready to put this code pattern to use? Complete details on how to get started running are in the README. The steps show you how to:

  1. Clone the repository.
  2. Configure OpenScale in a Jupyter Notebook.
  3. Utilize the dashboard for OpenScale.

Conclusion

This code pattern showed you how to train, create, and deploy a machine learning model using Watson Machine Learning on IBM Cloud Pak for Data. The code pattern is part of the Getting started with IBM Cloud Pak for Data learning path series.

The pattern is also part of the Getting started with Watson OpenScale learning path. To continue with this learning path, see Using OpenScale with any model, anywhere.

Scott D’Angelo
Lukasz Cmielowski