Getting started begins with looking at the problem you are trying to solve.

Start by asking yourself – What prediction do you want from the analytics engine? What specific information drives value for you? The analytics engine is going to apply an Aapp, (Algorithm application) to analyze/test your sample.  So, the question becomes: Is there a suitable Aapp you can license from the store, or should you build a new Aapp for your needs?

If there is no existing Aapp to detect your specific target of interest, you can create your own Aapp.

Let’s walk through the process.

The following are the steps someone coming to the analytics site for the first time would take to use all aspects of the site.  These steps include creating an account, connecting a piece of hardware, capturing and storing training data, creating a new Aapp, and finally using the Aapp to make a prediction.

We are going to use an example where the problem is trying to distinguish between two types of plastic (PLA vs. ABS), even though they appear identical to the naked eye.

For this example, we are going to use an Ocean Optics spectrometer (FlameNIR), together with a light source and a simple fiber optic probe. In addition, we have installed Stream’s Cloud Connect software on the computer connected to spectrometer, which will send readings from the spectrometer directly into the folders in your new account. To see how to install Cloud Connect, click here. Expand to see the actual hardware used.

Let’s begin.  Remember you can do this yourself… all at no cost.

Go to the analytics site

We begin by going to the Stream analytics website. The initial page shows the Aapps available in the online store. Viewing the details of each of these Aapps will show what the Aapp does, what hardware is required in order to use it, and which components the Aapp can identify.

We want to create an Aapp, so we need to create an account.

Choose sign up

Your account at analytics.streamtechinc.com can be created using your email address or your existing Google or Microsoft account credentials.

Create your account

Your account can be created for free by providing some simple information.

Connect your device

From the Connected Devices menu

When Cloud Connect is first installed, it will ask for a PIN number.  Click the add button on the Connected Devices page and then add a Software Device, giving it an appropriate name for ease of identification.  The new software device will then appear under the Connected Devices menu.  Click “View Details” on your device to get the PIN and enter that into the Cloud Connect software to complete the process.

Create your folders

Select the File Storage menu a click the “plus” sign to create a new folder.

Fill in a few things…

Name the folder – in this case Black Plastics. Select which piece of hardware you are going to use  – in this case an Ocean Optics spectrometer. Select the hardware profile  – which defines the settings for the spectrometer.

Begin to create the Aapp

Enter the basic information

Enter the name of the Aapp as it will appear in the online store. The description explains what the Aapp does. A vanity photo will make a more interesting icon. The hardware model sets what device you are using to capture the data, and the Hardware Profile contains the spectrometer’s settings.

The Aapp type can be either Classification – for a “this or that” problem; or Regression if the problem is a “how much” problem. This example would be Classification: Is the sample PLA or ABS?

 a bit more detail…

Add the components

Components define the things you are looking for.  In this case one component is PLA plastic, the other component is ABS plastic.   Assigning different colors to each component will help to distinguish the results.

Ready to start adding training data

The Aapp’s details

Across the top you will see the steps necessary to complete the Aapp. We are currently at the “waiting for Training Data” stage. Our two components are listed at the bottom, and the scan count (currently at 0/100) is colored red. This shows we have not added any training scans, and the minimum number of scans needed before training is allowed is one hundred. Once we have added at least one hundred scans, it will allow us to move to the next stage. Let’s add the training scans.

Cloud Connect adds training data

Select the device you are using

We are using an Ocean Optics spectrometer.  The Cloud Connect software registers it to your account, so it knows where to put the scans you will use to train the Aapp.

Collect data using Cloud Connect

Send the data to the Aapp

Pick the folder where you want the data to be sent. Alternatively, you can set both the folder AND an Aapp that the data will be used to train.

Scan the sample

Scan some pieces

In our example we are going to scan some ABS plastic to teach the Aapp what the reflectance spectrum of ABS looks like. The label input here identifies this scan is taken from sample ABS Rd2, and the component is set to ABS to tell the Aapp that this scan is ABS. This round of scanning is set to capture 150 independent scans.

Let’s review the Aapp’s details

A few scans added

You can see there are now 62 scans added.  More will be required before we can train.

In the queue to Train

There are now enough scans…

Once the number of training scans exceeds the minimum requirement of 100 per component, we can click the “Train” button and the Aapp will be put into the Queue, ready to be trained.

Training the Aapp

Cl

This step will actually build the Aapp..

Clicking the yellow “Train” button (top right) makes the analytics engine start building the Aapp.

A newly trained Aapp

Ready to be published

After training is complete your Aapp will be created. All that is left to do is to publish it so it is available for use. It can be published either privately or publicly. Before we publish, let’s have a quick look at how well the training for this Aapp performed, by looking at the Training Report.

Select Training Report

As this is the first time, there is only one

Each time the Aapp is trained (or retrained), a new Training Report is created to show how well the training went.

Training Report details

How well did we do?

This report shows results color coded to give an idea of how well the training went. Green means acceptable, yellow means it is borderline and could use more training, and red indicates that it doesn’t work at all and may require much more training data, a rethink of the sampling method, or a combination of the two.

Publish the Aapp

The Aapp creator sets the price

This Aapp can now be published Privately or Publicly. For this example we will publish Privately. Either way, a price is entered which establishes the cost per prediction from this Aapp for future use. Each Aapp published has a set number of free predictions. For more detail on pricing click here.

Aapps/Draft

Looking under the Aapps/Draft menu

Now that the Aapp is published, it can be found by looking under the menu Aapps/Drafts.  If it had been published Publicly, after a short review by Stream it would appear in the online store, back where we first began.

Ready to be used

The Aapp is ready to be used

Now we can use the Aapp to make a prediction on an unknown sample.


Prediction Sets

Results are Predictions

Once we’re ready to determine if a sample is ABS or PLA, the first step is to make a Prediction Set.

Create Prediction Set

A special type of container

Think of a Prediction Set as a container which combines a sample to be tested, the Aapp which will do the test, and the result of the test – the prediction.

Here is where this set is named, and we specify information about which hardware (and its settings) is going to be able to put its data into this set.

Prediction Set being built

The first step is to add data to be tested

To create a prediction set the first step is to add a file captured by the spectrometer. This file is from a piece of plastic which we want to identify as PLA or ABS.

Locate the sample

The sample scan will be found in a folder.

Clicking the Add File button allows us to select a file from the folders we have created, in this case, the sample scan. This file is added to the Prediction Set. Here we have added two files we would like to test.

Samples in Prediction Set

The samples will be saved into the Prediction Set

All we need to do now is make the prediction.  Select View Details.

Pick the Aapp that will predict

The name of the Aapp we created earlier

Select the Aapp…. and voila!

The sample is identified

For an unknown sample

This sample is correctly identified as ABS.

A second prediction

Prediction looks similar

Repeating the prediction process for a different sample, we can see it predicts the seconds sample correctly as PLA.