All Projects → IBM → predictive-model-on-watson-ml

IBM / predictive-model-on-watson-ml

Licence: Apache-2.0 license
Create and deploy a predictive model using Watson Studio and Watson Machine Learning

Projects that are alternatives of or similar to predictive-model-on-watson-ml

banking-digitalization-using-hybrid-cloud-with-mainframes
The following journey will introduce the available Banking APIs published on IBM Cloud with logical business programs running on the IBM Z Mainframe through a simulated retail bank called MPLbank.
Stars: ✭ 21 (-58.82%)
Mutual labels:  ibmcode, call-for-code
powerai-vision-object-detection
Use deep learning to create a model and a REST endpoint to allow your app to detect, locate and count your product on store shelves
Stars: ✭ 93 (+82.35%)
Mutual labels:  ibmcode, call-for-code
watson-discovery-ui
Develop a fully featured Node.js web app built on the Watson Discovery Service
Stars: ✭ 63 (+23.53%)
Mutual labels:  ibmcode, call-for-code
global-citizen
WARNING: This repository is no longer maintained ⚠️ This repository, which contains assets to run a Hyperledger Composer application, is not being actively maintained due to a shift to focus on Hyperledger Fabric. This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 54 (+5.88%)
Mutual labels:  ibmcode, call-for-code
visualize-data-with-python
A Jupyter notebook using some standard techniques for data science and data engineering to analyze data for the 2017 flooding in Houston, TX.
Stars: ✭ 60 (+17.65%)
Mutual labels:  ibmcode, call-for-code
watson-vehicle-damage-analyzer
A server and mobile app to send pictures of vehicle damage to IBM Watson Visual Recognition for classification
Stars: ✭ 62 (+21.57%)
Mutual labels:  ibmcode, call-for-code
pixiedust-facebook-analysis
A Jupyter notebook that uses the Watson Visual Recognition and Natural Language Understanding services to enrich Facebook Analytics and uses Cognos Dashboard Embedded to explore and visualize the results in Watson Studio
Stars: ✭ 42 (-17.65%)
Mutual labels:  ibmcode, watson-studio
smart-city-analytics
Analyze large data sets collected from a long-range IoT system that uses LoRaWAN networking
Stars: ✭ 28 (-45.1%)
Mutual labels:  ibmcode, watson-studio
Python-Geopandas-Workshop
In this workshop you will learn about pandas and geopandas by exploring UK Crime Data in a Jupyter notebook
Stars: ✭ 52 (+1.96%)
Mutual labels:  watson-studio
detect-timeseriesdata-change
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 21 (-58.82%)
Mutual labels:  ibmcode
watson-multimedia-analyzer
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode. A Node app that use Watson Visual Recognition, Speech to Text, Natural Language Understanding, and Tone Analyzer to enrich media files.
Stars: ✭ 23 (-54.9%)
Mutual labels:  ibmcode
vr-speech-sandbox-cardboard
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 27 (-47.06%)
Mutual labels:  ibmcode
Watson-Unity-ARKit
# WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 24 (-52.94%)
Mutual labels:  ibmcode
Solution-Starter-Kit-Hunger-2021
2021 Call for Code Global Challenge solution starter kit: Zero hunger.
Stars: ✭ 40 (-21.57%)
Mutual labels:  call-for-code
Kubernetes Container Service Gitlab Sample
This code shows how a common multi-component GitLab can be deployed on Kubernetes cluster. Each component (NGINX, Ruby on Rails, Redis, PostgreSQL, and more) runs in a separate container or group of containers.
Stars: ✭ 240 (+370.59%)
Mutual labels:  ibmcode
watson-discovery-food-reviews
Combine Watson Knowledge Studio and Watson Discovery to discover customer sentiment from product reviews
Stars: ✭ 36 (-29.41%)
Mutual labels:  ibmcode
dnn-object-detection
Analyze real-time CCTV images with Convolutional Neural Networks
Stars: ✭ 93 (+82.35%)
Mutual labels:  ibmcode
watson-waste-sorter
Create an iOS phone application that sorts waste into three categories (landfill, recycling, compost) using a Watson Visual Recognition custom classifier
Stars: ✭ 45 (-11.76%)
Mutual labels:  ibmcode
BlockchainPublicRegulationFabric-Food
A Public Regulation Fabric example in the Food Industry
Stars: ✭ 47 (-7.84%)
Mutual labels:  ibmcode
predict-wildfire-intensity
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated.
Stars: ✭ 32 (-37.25%)
Mutual labels:  call-for-code

Deploy a model to predict heart failure with Watson Machine Learning

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

This code pattern can be thought of as two distinct parts:

  1. A predictive model will be built using AutoAI on IBM Cloud Pak for Data. The model is then deployed to the Watson Machine Learning service, where it can be accessed via a REST API.

  2. A Node.js web app that allows a user to input some data to be scored against the previous model.

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

  • Build a predictive model with AutoAI on Cloud Pak for Data
  • Deploy the model to the IBM Watson Machine Learning service
  • Via a Node.js app, score some data against the model via an API call to the Watson Machine Learning service

Sample output

Here's an example of what the final web app looks like

form

Architecture

  1. The developer creates a Cloud Pak for Data project.
  2. A model is created with AutoAI by uploading some data.
  3. Data is backed up and stored on Cloud Object Storage.
  4. The model is deployed using the Watson Machine Learning service.
  5. A Node.js web app is deployed on IBM Cloud. It calls the predictive model hosted on the Watson Machine Learning service.
  6. A user visits the web app, enters their information, and the predictive model returns a response.

"architecture diagram"

Prerequisites

NOTE: As of 10/16/2020, the Watson Machine Learning service on IBM Cloud is only available in the Dallas, London, Frankfurt, or Tokyo regions. Not the Seoul, Frankfurt, or Sydney regions.

Steps

  1. Create an IBM Cloud API key
  2. Create a new Cloud Pak for Data project
  3. Build a model with AutoAI
  4. Deploy the model with WML
  5. Run the Node.js application

1. Create an IBM Cloud API key

To use the Watson Machine Learning service programmatically we'll need an API key. Even though this isn't used until later on, let's create one now.

Navigate to https://cloud.ibm.com/iam/apikeys and choose to create a new API key.

create api key

Give it a name and description, hit OK. Write down the API key somewhere.

generated api key

2. Create a new Cloud Pak for Data project

Log into IBM's Cloud Pak for Data service (formally known as Watson Studio). Once in, you'll land on the dashboard.

Create a new project by clicking Create a project.

new project

Choose an Empty project.

empty project

Enter a Name and associate the project with a Cloud Object Storage service.

empty project

NOTE: By creating a project in Watson Studio a free tier Object Storage service will be created in your IBM Cloud account. Select the Free storage type to avoid fees.

At the project dashboard click on the Assets tab and upload the data set associated with this repo. patientdataV6.csv

upload data

3. Build a model with AutoAI

Now we're going to build a model from the data using IBM's AutoAI. A tool that will automatically create multiple models and test them, giving us the best result. Data science made easy!

Start by clicking on Add to project and choosing AutoAI experiment.

Add to project

Give it a Name and specify a Watson Machine Learning instance.

WML

Choose to use data from your project.

Choose data

Choose the patientdataV6.csv option.

data set

For the "What do you want to predict?" option, choose HEARTFAILURE.

right column

The experiment will take a few minutes to run. Once completed hover over the top option to make the Save as button appear. Click it.

experiment

Choose to save the experiment as a Model. You can optionally download a generated Jupyter Notebook that can be used to re-create the steps that were taken to create the model.

save

You model will be saved. Click the dialog to view it in your project.

dialog

Once you're at the model overview choose the button Promote to deployment space.

promote

4. Deploy the model with WML

To promote the model to deployment you must specify a deployment space. If no space is created choose the New space + option to create one. This action will associate the model with the space.

specify space

Navigate to the space using the hamburger menu () on the top right and choose to View all spaces.

hamburger

Click on the space you saved the model to.

space

Choose the deploy the model by clicking the rocket ship icon.

deploy

Choose the Online deployment option and give it a name.

online

Your new deployment will appear.

new deployment

Click on the API reference tab and save the Endpoint. We'll be using this in our application.

endpoint

5. Run the Node.js application

You can deploy this application as a Cloud Foundry application to IBM Cloud by simply clicking the button below. This option will create a deployment pipeline, complete with a hosted Git lab project and devops toolchain.

Deploy to IBM Cloud

You may be prompted for an IBM Cloud API Key during this process. Use the Create (+) button to auto-fill this field and the others. Click on the Deploy button to deploy the application.

pipeline

Before using the application go to the Runtime section of the application and in the Environment variables tab add in your API_KEY and DEPLOYMENT_URL values from steps 1 and 4.

TIP Do NOT wrap these values with double quotes.

Once updated your application will restart and you can visit the application by clicking on Visit App URL.

env vars

The app is fairly self-explantory, simply fill in the data you want to score and click on the Classify button to test how those figures would score against our model. The model predicts that the risk of heart failure for a patient with these medical characteristics.

risk

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].