Predictive Maintenance using Azure ML – Part III

Preparing for some Azure ML magic!

Let’s reiterate the steps required to get Azure ML up running:

  1. Feed Azure ML with some data, either historical or current data.
    There are a variety of ways to make your data available to Azure ML where the trivial approach is to simply upload your data set to Azure ML.
    Azure ML also supports cleaning your data like removing duplicates, removing columns not relevant for your analyses etc.
  2. Define the model that will be used to make predictions
    This is of course the most important step and also the step where at least some understanding of Machine Learning is required. Here we build a model which depends on whether we are dealing with supervised or unsupervised learning and whether we are dealing with for instance a classification or a regression problem.
    An example of a model could be to predict if a machine problem is mechanical or electrical. This is a classic classification problem.
  3. In the case of supervised learning we need to train our model on our known dataset.
    Typically you use 80% of your known data for training and then 20% for validation.
  4. Validate the model using known data.
    Apply your model to part of the data you set aside for validation to test if the model is able to predict known results.
  5. If the model performance is “adequate” (i.e. it is able to make correct predictions on known data at an acceptable rate) expose the model to real time data
    Azure ML allows you to expose your model as a web service to make it consumable for other software components or to people without Azure ML access or competencies.

The data we will feed into Azure ML to do analytics on in this articel is contained in two tables.
One table with vehicle mileage data and another table with registered breakdowns:

Mileage table
Asset Id Timestamp Mileage
volvo-01 3/7/2015 100
volvo-01 4/7/2015 120
tesla-09 9/2/2015 200
Breakdown table
Asset Id Timestamp Breakdown
volvo-01 3/7/2015 Mechanical
tesla-09 4/7/2015 Electrical
tesla-09 9/2/2015 Electrical

This is actually a pretty well chosen data set as in maintenance / CMMS, the situation very often is, that you have a potentially huge amount of assets (i.e. machines or machine components) and for each asset you have a huge amount of readings, either collected manually or automatically through PLC’s etc. Or maybe even over the internet in which case you are the proud owner of an “Internet of Thing”’s! Exactly how you collect you data is not really that relevant but including the “Internet of Things” thing in this article will probably increase the article sharing probably by an order of a magnitude! Just how probable is something we could ask Azure ML……. IoT IoT IoT…. Just to be sure Google picks it up! 😉

Predicting the breakdown type is a classification problem which is what we want to focus on.
Predicting when there will be a breakdown is a regression problem which will not be our focus.

Azure ML supports a wide variety of multi-class classification algorithms like:

  • Multi-class Decision Forest
  • Multi-class Decision Jungle
  • Multi-class Logistic Regression
  • Multi-class Neural Network

In Supervised Learning, Azure ML makes it very easy to try out multiple algorithms, so a deep understanding of the different algorithms is not stricty necessary. You simply try out multiple algorithms on known data and see which algorithm performs the best. We will get back to that a little later, and for now assume Logistic Regression is our favorite algorithm.

Given the data and an algorithm we can setup our model in Azure ML Studio:

Azure ML Studio 1

Starting at the top-right of this model we have our dataset containing the mileage and the breakdown tables. Within Azure ML Studio you can massage your dataset in various manners to e.g. remove columns not relevant for the analysis, remove dublicates etc. This is what takes place in the “Project Columns” node.

The splitting of the dataset is where we reserve some of our known data for training and some fore scoring. In this case we reserve 20% for scoring and use 80% for the training.

The result of the scoring of our model where we use Logistic Regression can be visualized in Azure ML:

Azure ML Studio 2

From the above visualization we can see that the Logistic Regression algorithm is able to predict the correct fault type, e.g. electrical with an error on 4.1%. In total we have an error percentage on 10.6%. One way to try to bring down the error percentage is to adjust some initializtion values, which can be done based on a deeper understanding of the algorithm or based on a Parameter Sweeping. We will not go into details on Parameter Sweeping but simply note that if we make use of Parameter Sweeping in the above example we can reduce the error percentage to 5.8%.

Another way to try to achieve a lower error percentage is to replace the algorithm. Using Azure ML Studio this is quite easy:

Azure ML Studio 3

In the above we have simply added a selection of algorithm nodes to our model which we can then compare:

Algorithm comparison
Algorithm Total error
Logistical Regression 5.8%
Neural Network 6.2%
Decision Jungle 2.4%
Decision Forest 2.4%

Let’s step back a moment and review what we have achieved:

  • We have uploaded our known dataset to Azure ML
  • We have created our model in Azure ML
  • We have trained our model using a subset of the uploaded data
  • We have scored our model using the remaining data
  • We have compared the performance of various algorithms 

All this work is preparation work that only has to take place once for a given model. Now that we have the model in place with a preferred algorithm we can start to expose our model to real time data. So let’s move on to the next (much shorter!) part where look at how to do predictions.

PS: Credit to Tomas Grubliauskas for providing the hardcore background material for these posts

0 Comments

Write a Comment

Your email address will not be published. Required fields are marked *

More articles

IoT data flow

EAM with IoT integration

It’s now possible to get values from an IoT device into Dynaway EAM on...

planning-board-ios

Graphical Plannning Board

It has definitely been a challenging development project to get the graphical Planning Board...

victrexlogo-s

Victrex live on Dynaway EAM

Victrex is now live on Dynaway EAM at their Rotherham, Seal Sands and Hill...

NovationiQ

Novation iQ using EAM for IT Help Desk

The plant maintenance team at Novation IQ is in the process of deploying Dynaway’s...

Rolland

Rolland live on Dynaway EAM

Rolland Inc. is now live on Dynaway EAM after an exemplary team effort by...

The Physical Web

Smart data collection using Beacon’s

The Physical Web The physical web is an open approach to enable quick and...

close

About our demo

We are always happy to demonstrate the capabilities and value of our solutions so do not hesitate to request a product demonstration. Usually we setup a discovery call to make sure we understand your business, requirements and demo expectations to make sure we focus on what is relevant for you in a subsequent demo.

Did you know..?

Dynaway operates through partners around the globe as well as direct on end-customers. We have a team of globetrotters who can assist in answering RFI's, RFP's as well as leading the scoping and implementation of your Dynaway solutions.