IBM/predictive-model-on-watson-ml

Name: predictive-model-on-watson-ml

Owner: International Business Machines

Description: Create and deploy a predictive model using Watson Studio and Watson Machine Learning

Forked from: djccarew/watson-dojo-pm-tester

Created: 2017-08-22 15:36:28.0

Updated: 2018-05-21 20:29:04.0

Pushed: 2018-05-21 20:29:03.0

Homepage: https://developer.ibm.com/code/patterns/create-and-deploy-a-scoring-model-to-predict-heartrate-failure/

Size: 18359

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

DISCLAIMER: This application is used for demonstrative and illustrative purposes only and does not constitute an offering that has gone through regulatory review.

Create and deploy a scoring model to predict heart failure on IBM Cloud with the Watson Data Platform

Data Science Experience is now Watson Studio. Although some images in this code pattern may show the service as Data Science Experience, the steps and processes will still work.

In this Code Pattern, we will use a Jupyter Notebook on IBM Watson Studio to build a predictive model that demonstrates a potential health care use case. This a customized version of the Node.js sample app that is available with the Watson Machine Learning Service on IBM Cloud. See the original app for a walkthrough of the source code.

When the reader has completed this Code Pattern, they will understand how to:

Flow
  1. The developer creates an IBM Watson Studio Workspace.
  2. IBM Watson Studio depends on an Apache Spark service.
  3. IBM Watson Studio uses Cloud Object storage to manage your data.
  4. This lab is built around a Jupyter Notebook, this is where the developer will import data, train, and evaluate their model.
  5. Import data on heart failure.
  6. Trained models are deployed into production using IBM's Watson Machine Learning Service.
  7. A Node.js web app is deployed on IBM Cloud calling the predictive model hosted in the Watson Machine Learning Service.
  8. A user visits the web app, enters their information, and the predictive model returns a response.
Included components
Featured technologies

Steps

  1. Deploy the testing application
  2. Create an instance of the Watson Machine Learning Service
  3. Create a project in IBM Watson Studio and bind it to your Watson Machine Learning service instance
  4. Save the credentials for your Watson Machine Learning Service
  5. Create a notebook in IBM Watson Studio
  6. Run the notebook in IBM Watson Studio
  7. Deploy the saved predictive model as a scoring service using the web ui
  8. Deploy the saved predictive model using APIs
Prerequisites

As of 2/5/2018, the Machine Learning service on IBM Cloud is only available in the US South or United Kingdom regions.

1. Deploy the testing application

Use Ctrl-click on the Deploy to IBM Cloud button below to open the deployment process in a separate tab.

Deploy to IBM Cloud

Note: Make sure to deploy the application to the same region and space as where the Apache Spark and Cloud Object Storage services were created when you signed up for IBM Watson Studio. Please take note of this space as later in this lab the Watson Machine Learning service needs to be deployed into the same space.

2. Create an instance of the Watson Machine Learning Service
3. Create a project in IBM Watson Studio and bind it to your Watson Machine Learning service instance

Note: Services created must be in the same region, and space, as your Watson Studio service. Note: If this is your first project in Watson Studio, an object storage instance will be created.

4. Save the credentials for your Watson Machine Learning Service
5. Create a notebook in IBM Watson Studio
6. Run the notebook in IBM Watson Studio

Note: Make sure to rename the variable to df_data and add .option('inferSchema','True')\.

Insert Spark Data Frame Step 3

7. Deploy the saved predictive model as a scoring service using the web UI

8. Deploy the saved predictive model using APIs

Sample Output

Score

Learn more

License

Apache 2.0


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.