In this blog post, we will talk about how we can use an unsupervised learning algorithm to start creating value as fast as possible.

A water pump

With good reasons, few companies label their data from machines as “normal ” or “broken ” before having a strategy towards doing predictive maintenance in the nearest future. Therefore, it takes a long time to get the right data in the right format, to be able to use a complex machine learning algorithm as we din in previous blog post . Additionally, if we run a one-year time period for collecting data of which the machine runs normally, and when it experience breakdowns, we will be looking for a long implementation time. To be able to use the previous approach, we need to experience at least three breakdowns on the machines, that are recorded in the data mesh and labeled right.

In the case of making a good machine learning model for predicting future breakdowns, we actually appreciate past breakdowns. The more the merrier, as the predictions gets more accurate by having more examples to learn from!

What is Supervised and Unsupervised Learning?

To understand how these two machine learning approaches differs, we will give a short clarification before we continue.
Supervised Learning describes one approach of how the machine learning algorithm learns while training. In supervised learning you supervise the training phase by telling the algorithm what the true output value is. This is done by labeling your output values. As an example, if we are trying to classify cats from dogs and vice versa, we would label all pictures as being either a cat or a dog, and use that for training, validating, and testing the accuracy of our model. When the model is created, there is no further need for labeling the data, unless it is used for re-training purposes. For predictive maintenance, we would have to label all samples as of which stage the machine is at. These stages could be divided into 1) running, 2) warming up, 3)broken, and 4) recovering.
Supervised learning algorithms works great for classification - and regression problems such as forecasting and classifying the current stage the machine is at, like we did in previous blog post with Random Forest.

Unsupervised Learning describes another learning approach of which machine learning algorithms themselves have to learn when to classify something as either a cat or a dog. Unsupervised learning approaches cannot solve all problems. They are great at solving those problems, that we - ourselves - have a hard time solving. An example for unsupervised learning is to cluster your customers in different segments, so those who look similar on different parameters, are clustered together. This information can then be used to target marketing.

Reduce the implementation time with unsupervised learning

By using an unsupervised learning algorithm, we can use data from which the machine is running in in the stage “Normal” to create a model. This model can predict the probability of future breakdowns with almost as high success rate as the supervised learning algorithm. By using this model, we can start gaining value within a very short time-period, being able to identify almost all breakdowns, while getting more data for creating the more advanced supervised learning algorithm with a higher accuracy.

Running the test

We use the data from which the water pump runs normally, and create a model. We then save the model and starts predicting on the entire dataset, including the observations of breakdown.

We know that we had a failure the 12th of April 2018 at 09:55 pm, and were with our LSTM model able to predict the future breakdown 30 minutes prior to the incident. However, with our new machine learning model we can predict the same failure 10 minutes before the breakdown.

Additionally, in previous blog post we tried to detect the breakdown the 8th of July 2018 at 11:00. With our LSTM model we were able to detect this incident 38 minutes prior to the failure. With this model, we can spot this failure 61 minutes prior to the breakdown!

If we look at the rest of the failures, we can detect them from 12 - 37 minutes before the they occur, however the confidence level is not as strong as with our LSTM model, yet still significant and correct!

How to get started

This is great!
In neurospace we believe in creating value as fast as possible, and this is exactly what we can do with these two approaches. We are capable of predicting the breakdowns from 9 - 61 minutes prior to the incident with this unsupervised learning approach, that can be implemented by only using data from which the machine is running normally. If your company has a bottleneck machine, that you today do not retrieve data from, this means that with 1 month of data, we can start creating value, and predict future breakdowns with a high success rate.

Even though we can predict the breakdowns successfully prior to the incident with this approach, they are less confident than with our LSTM model. Therefore, our long-term goal for better predictions is to use the more complex algorithm, and thereby having less false positives.

So how do you get started?

Journey Towards Predictive Maintenance

It all starts with data! We need data from the machines to be able to create a model that is tailored to the specific machine. This data must consist of those parameters that can help predicting a future breakdown.
If the machine starts to vibrate more than what is normal, we would probably start thinking that something is wrong. Therefore vibration sensors can be used to predict some future failures.
If the temperature starts to increase and the machine is overheating, we additionally would start thinking that something is wrong. Therefore, temperature might be an important measurement.
In some cases, we can hear that the machine is sounding weird. With these machines, sound might be an important measurement.
Finally, we might have a machine of which humidity can help us predict future breakdowns. To get the data from machines, we need to install sensors that can retrieve the right data in the right frequency. It is highly recommended to retrieve data with a high frequency (minutes, seconds) for better predictions.

When data has been retrieved, you can start getting insight in your machinery by help of descriptive statistics. With that insight, we can see if the data collected is sufficient, and start making a prediction model for detecting future breakdowns.


If your company has a bottleneck machine that experience breakdowns, we can create a machine learning model that succesfully can predicting future failures - with data from just one month. Using this model, we can help preventing some of the future breakdowns - while labeling the data with the purpose of using the more complex and confident machine learning algorithm in the future.
With this dataset from a water pump, we are able to predict all future breakdowns from 10 to 61 minutes prior to the failure. The predictions however, are not as confident as they aer in our LSTM model.

// Maria Jensen, Machine Learning Engineer @ neurospace