IBMDeveloperUK / NodeRED-for-AI-flows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to the NodeRED and AI workshop

NodeRED Watson Azure

In this workshop, you will be building Node-RED flows to interact with AI services in a number of environments:

  • invoking Watson Cognitive services in IBM Cloud
  • invoking your own Machine learning models, running in Watson Studio
  • servicing requests from a Watson Studio Jupyter notebook to update a real-time models
  • invoking 3rd party AI services - e.g. Azure translate

Prerequisites

Use of the Watson Studio, and Cognitive services also requires an IBM Cloud account. A "Lite" account will be sufficient.

With an IBM Cloud account, you will be able to run a NodeRED application instance. You can also run NodeRED locally on your laptop or Raspberry Pi (Windows, Mac, Linux - as long as it will run a supported Node.js V8 LTS environment)

IBM Cloud account

If you have already established an IBM Cloud account, please use that - if not, sign up at IBM Cloud registration.

Local NodeRED installation

Please follow system specific guides at NodeRED installations.

Once installed, to more easily use the Watson Cognitive services, installed the node-red-node-watson npm package, using one of the methods detailed at Adding nodes.

IBM Cloud NodeRED instances

If you have, or register for, an IBM Cloud Lite account, you will have sufficient runtime memory entitlement to run one NodeRED instance, based on the Node-RED starter.

This creates a Node SDK runtime application, and an instance of the Cloudant NoSQL database; you can only have one instance of the Cloudant database under the Lite plan -- effectively, this means you can only create and run one NodeRED starter application with your Lite account. ** Worry not! ** as NodeRED allows for a great deal of flexibility in supporting multiple flows, and micro-applications within a single instance.

Watson Studio setup

1 Create a Watson Studio service instance from the IBM Cloud AI services catalog

Reference code patterns and tutorials

There are complete tutorials for each of the main activities:

Watson Cognitive

A very comprehensive set of examples of exploiting Watson Cognitive services via NodeRED is available at Emma Dawson's node-red-labs github repository.

Creating a machine learning service in Watson Studio

An example of setting up a scoring service to predict customers' propensity to buy particular retail offerings is available at developerWorks TV. This shows how to create the scoring service - you can then learn how to invoke that service from NodeRED

Invoking 3rd party services

Since NodeRED is an open source project, the community develops new nodes as needed - earlier this year, a package for interacting with Microsoft Azure cognitive services was created. This package - node-red-contrib-cognitive-services - makes it quick and easy to invoke these services from within a NodeRED flow. An example flow Node-Red Azure Computer Vision Photo Recognition Complete Example shows how to invoke the image classifier. You will need an Azure account, and the necessary service subscription keys, to be able to try this out.

Triggering real-time execution model updates

Using IOT historical data, this Cognitive IOT tutorial shows how to interpret events, identify anomalies, and update runtime processing models to accomodate new knowledge.

What you'll end up with

It's always good to know what you will get at the end. This workshop will lead to a web application that previews and classifies images with IBM Watson and Microsoft Azure Cognitive (for demo purposes, we'll use pictures of a tent), and demonstrates using a Machine Learning scoring service to predict a prospective customer's likelihood of buying a particular product (for demo purposes, a tent)

demo flow

demo overview

demo score

On to the Activities ...

  1. Watson Nodered 101
  2. Watson Cognitive services - a visual recognition sample
  3. Watson Machine Learning scoring service
  4. Azure Cognitive services - simple examples
  5. Watson Studio notebook anomaly detection

About


Languages

Language:HTML 50.1%Language:CLIPS 43.2%Language:Batchfile 6.7%