Is there a way to detect anomalous data in the machine before it reduces its downtime? Manufacturing industry professionals have long struggled with poor and fewer maintenance strategies. As a result, it lowers the productivity of machinery. At the same time, unplanned downtimes due to frequent maintenance activities can lead to financial loss. One way or another, we have a device that can alert us to a possible failure of machine parts. Cutting-edge new anomaly detection systems are starting to be tested and implemented by manufacturing operators at the forefront of innovation. But how do these systems work?
You can also read Triple your Results with Predictive Maintenance
In statistics and data mining, anomalies are data points, events, or observations that do not conform to the expected pattern of the given data set. Anomalies creep into data sets by faulty systems capturing the data, or events that aren’t likely to happen on a regular day. For example, a machine malfunctioning would send in anomalous data to the system via its sensor and timely detection of these could help us reduce machine downtime and loss in production output.
Before we get into understanding of machine learning techniques to filter out anomalous data points, it’ll be helpful if we wrap our heads around a broad classification of machine learning techniques. We can classify these intelligence methods into two broad categories:
- Supervised Learning — Supervised learning is used when we have historical datasets, manually and methodically labeled to classify observations into normal events and abnormal events (1’s and 0’s).
- Unsupervised Learning — Unsupervised learning is applied when we don’t know what we are looking for in the data.
Unsupervised Anomaly Detection
There is a dearth of labeled data when a manufacturing unit isn’t well established or is starting from scratch. When this occurs, decision trees and logistic regression are unsuccessful machine learning techniques. Data scientists must develop models that can function without human supervision, spot anomalous observations, and issue warnings when such an occurrence occurs.
K-nearest neighbors (K-NN)
K-NN is a supervised machine learning technique that employs an unsupervised method for anomaly identification. An unsupervised technique is one that is purely reliant on threshold values and does not include any actual “learning” of the process or predetermined classification of the dataset as an “outlier” or “non-outlier.” Assume we have the data distribution shown in the image. The point p1 is obviously an outlier.
We intuitively saw that the nearest neighbor is very far away from point p1(the local density was low), making it an anomaly. This same intuition powers this algorithm. We calculate the average distance (the local density) of each point with its ‘k’ nearest neighbors. A point will be an outlier if this average distance is significantly higher than the average distances of its ‘K’ nearest neighbors.
Although extremely simple logic behind the algorithm, it has performed more robustly and accurately in spotting anomalous data when compared to complex algorithms. Since the model is overly simplified, it cannot handle categorical variables well, as it becomes incredibly difficult to calculate distances for a categorical variable.
Case Study
A company recently improved its machinery through incorporation and is looking for the causes of ongoing equipment failure. Unsupervised learning can be utilized because there aren’t enough high-quality datasets with labels. Because the dataset only includes continuous, numerical variables that were captured by the sensor (as can be seen in the figure above), K-NN may be used to extract the anomalous occurrences.
Further inspection by the engineers can narrow down the root cause search.
Anomaly Detection With Isolation Forest
“Grow decision trees when nothing works.” has been a credo to which data scientists have clung. Even though K-nearest neighbors are fundamentally quite straightforward, they suffer from a number of issues, including the handling of categorical variables, performance issues, and space limitations. As a result, K-NN is all but useless for real-world business applications.
Simple decision trees had to be grown for each of the factors. Anomaly detection is made simple once every data point has gone through the decision tree and is occupying its own node. In a terminal node, the points that are very close to the root are anomalous because it requires fewer judgments to separate them from the other points. To increase the robustness and effectiveness of the model, data scientists create several decision trees (Isolation Forest).
The advantage of this method is like a decision tree, the isolation forest is nonparametric and makes no assumptions about the data and hence can detect outliers from a mix of categorical and numerical variables. Another advantage is the runtime of the algorithm. It is exponentially faster than the iterative K-NN algorithm and hence handles larger datasets. As a result, this algorithm could more accurately tell where and when abnormal behavior has occurred? Where and when an anomaly has occurred or will occur? When maintenance or new equipment is necessary.
Conclusion
Millions of data points and numerous category factors are virtually always present in a business. Researchers created an algorithm that could handle these challenging tasks in an unsupervised manner to address this issue. The creation of a pipeline that starts spotting anomalous observations and, as a result, preemptive machine maintenance could save your company millions of dollars before a failure.