0% found this document useful (0 votes)
56 views8 pages

5.1.1 Objective and Scope: Jyenis 2020

This document discusses anomaly detection in time series data using machine learning algorithms. It begins with an introduction to anomaly detection and its applications. Then, it discusses previous literature on time series anomaly detection techniques. Next, it describes the workflow used which includes preprocessing data, training models, plotting anomalies, and predicting anomalies on new data. Finally, it discusses the results of applying various anomaly detection models to a time series dataset and concludes that anomaly detection can help capture anomalies and improve operations.

Uploaded by

Andam Sai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views8 pages

5.1.1 Objective and Scope: Jyenis 2020

This document discusses anomaly detection in time series data using machine learning algorithms. It begins with an introduction to anomaly detection and its applications. Then, it discusses previous literature on time series anomaly detection techniques. Next, it describes the workflow used which includes preprocessing data, training models, plotting anomalies, and predicting anomalies on new data. Finally, it discusses the results of applying various anomaly detection models to a time series dataset and concludes that anomaly detection can help capture anomalies and improve operations.

Uploaded by

Andam Sai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

CHAPTER 5

ANOMALY DETECTION - TIME SERIES

5.1 Introduction

The production enterprise is taken into consideration, They have a tendency to make use
of numerous heavy equipment along with massive motors, pumps, pipes, furnaces, con-
veyor belts, haul trucks, dozers, graded electric powered shovels, etc. These are regularly
taken into consideration the maximum vital belongings for their operations. Therefore,
the integrity and reliability of this equipment are regularly the core consciousness in
their Asset Management programs.

Therefore, the ability to detect anomalies earlier and mitigate dangers is a valuable
capability that similarly permits stopping unplanned downtime, needless maintenance
(condition-based vs. mandatory maintenance) and also will allow an extra powerful
manner of handling vital additives for these assets. .

Anomaly detection or outlier detection identifies rare items, observations, patterns, out-
liers, or anomalies that substantially range from the ordinary items or patterns. Anomalies
are occasionally known as outliers, novelties, noise, deviations, or exceptions.(Jyenis
(2020))

5.1.1 Objective and Scope

There are diverse domain names that enforce this method which includes fault detection,
intrusion, fraud detection, fitness care monitoring, detecting environment disturbances,
and plenty of more. Typically, the anomalous gadgets will translate to a few type of
trouble which includes::
• Bank fraud,
• Structural defect,
• Medical problem,
• Error, etc.
Objective:

Our objective is to find anomalies in the time series data with unsupervised machine
learning algorithms.

5.2 Literature Review

In Teng (2010), they proposed anomaly detection algorithm which is an instance-based


and also to reduce the number of distance computations of time series they pro a local
instance summarization approach to, so that abnormal time series can be efficiently
detected.In Laptev et al. (2015), paper for automated anomaly detection on large scale
time-series data introduces a generic and scalable framework and found that for 50-60
percent improvement in precision and recall for a variety of use-cases their framework
makes it possible. In Munir et al. (2018), a novel deep learning-based anomaly detection
approach (DeepAnT) for time series data is presented in this paper , to the non-streaming
cases it is equally applicable and to detect a wide range of anomalies it is working
excellently, In evaluation to the paradox detection strategies in which anomalies are
learned, DeepAnT makes use of unlabeled information to seize and study the information
distribution that is used to forecast the regular behavior of a time series. In Zhang et al.
(2019), to perform anomaly detection and diagnosis in multivariate time series data they
propose a Multi-Scale Convolutional Recurrent Encoder-Decoder (MSCRED)

5.3 Anomaly Detection in Time-Series-Workflow

5.3.1 WorkFlow:

1.Preprocess the given Time-Series data.

2.Train the ten available anomaly detection models with the preprocessed data.

3.Plot the anomalies detected for each of the given models

4.Predict anomalies for new data using the pre-trained model

26
5.3.2 Modules Used:

Pycaret Anomaly Detection Module: PyCaret’s Anomaly Detection Module is an


unsupervised machine learning module used to identify rare items, events, or observations
that raise suspicions by differing significantly from the majority of the data.(Ali (2020)
and Pulagam (2020))

5.3.3 Models Used:

1.Angle-based Outlier Detection (abod)

2.Isolation Forest (iforest)

3.Connectivity-Based Outlier Factor (cof)

4.Clustering-Based Local Outlier (cluster)

5.One-class SVM detector(svm)

6.Histogram-based Outlier Detection (histogram)

7.k-Nearest Neighbors Detector (knn)

8.Local Outlier Factor (lof)

9.Subspace Outlier Detection (sod)

10.Stochastic Outlier Selection (sos)

5.3.4 Methodology:

1.We first preprocess the given time series data and train it with each of the 10 models.
2.Each model will train with this data and will assign every datapoint a value of either 0
or 1.

3.If an outlier is detected, that data point will be given a value of 1 otherwise a value of
0 will be given.

4.We then plot the anomalies for the data given by the model to visualize

5.We applied a scoring mechanism by which if a data point is assigned as an anomaly by

27
more than 4 models, then it is considered as an anomaly.

6.We also predicted the anomalies in new data using these pre-trained models.

5.4 Results and Discussions

We developed a mechanism to detect anomalies in a given time series dataset using


different anomaly detection algorithms and compare the results of one algorithm against
another.We also used these pre trained models for predicting anomalies in new data.We
can even change the hyperparameters of the models if required.

Figure 5.1: Results of all Models - Anomaly Detection

The above figure(5.1) shows the results of all the models compiled together for anomaly
detection in a given dataset.Here a 0́’ is assigned for non anomaly datapoint and 1́ for an
anomaly datapoint.

28
Figure 5.2: Plot of Anomalies using Isolation Forest Model

Figure 5.3: 3D TSNE Plot for Anomalies Using Isolation Forest Model

5.5 SUMMARY AND CONCLUSION

Anomaly detection alone or coupled with the prediction capability can efficiently capture
the fraud and find out bizarre activity in huge and complicated datasets. It can be vital
for banking security, medicine, marketing, herbal sciences, and production industries
depending on clean and secure operations. With Artificial Intelligence, organizations can
grow the effectiveness and safety in their virtual operations, preferably with our help.

We developed a scoring system for determining whether a given data point is an anomaly
or not. We used various models available for this system, and we can also predict

29
anomalies in new data using this system. In future, various other models and scoring
systems can be developed for detecting anomalies in unlabeled data.

We can also forecast new data using previous data and check the anomalies in that future
data so that we can predict any errors as well.

30
REFERENCES
1. M. Ali (2020). Time Series Anomaly Detection with
PyCaret. https : / / towardsdatascience . com /
time-series-anomaly-detection-with-pycaret-706a6e2b2427.

2. Ashabb. (2020). Image recognition with RESNET50


model. https : / / medium . com / @ashabb /
image-recognition-with-model-resnet50-d89bce852c24.

3. A. Ayanzadeh (2018). Canny Edge Detection Method. https://a-ayanzadeh.


medium.com/canny-edge-detection-method-23a23b282ac0.

4. J. Brownlee (2017). How to Handle Missing Data with Python. https://


machinelearningmastery.com/handle-missing-data-python/.

5. S. Das and U. M. Cakmak, Hands-On Automated Machine Learning: A beginner’s


guide to building automated machine learning systems using AutoML and Python. Packt
Publishing Ltd, 2018.

6. J. Dias, P. Godinho, and P. Torres, Machine learning for customer churn prediction in
retail banking. In International Conference on Computational Science and Its Applica-
tions. Springer, 2020.

7. M. Feurer and F. Hutter, Towards further automation in automl. In ICML AutoML


workshop. 2018.

8. Y. G. (2017). The 7 Steps of Machine Learning. https://towardsdatascience.


com/the-7-steps-of-machine-learning-2877d7e5548e.

9. K. Gautam, Indian currency detection using image recognition technique. In 2020


International Conference on Computer Science, Engineering and Applications (ICCSEA).
IEEE, 2020.

10. N. Gopee (). Classifying cifar-10 images using unsupervised feature & ensemble
learning.

11. B. Jyenis (2020). Anomaly Detection in Time Series Sen-


sor Data.. https : / / towardsdatascience . com /
anomaly-detection-in-time-series-sensor-data-86fd52e62538.

12. N. Laptev, S. Amizadeh, and I. Flint, Generic and scalable framework for automated
time-series anomaly detection. In Proceedings of the 21th ACM SIGKDD international
conference on knowledge discovery and data mining. 2015.

13. Y. Li and B. Wang, A study on customer churn of commercial banks based on learn-
ing from label proportions. In 2018 IEEE International Conference on Data Mining
Workshops (ICDMW). IEEE, 2018.

14. V. Meel (). YOLOv3 Overview.

37
15. M. Munir, S. A. Siddiqui, A. Dengel, and S. Ahmed (2018). Deepant: A deep learning
approach for unsupervised anomaly detection in time series. IEEE Access, 7, 1991–2005.

16. M. Olafenwa and J. Olafenwa (2021). Custom Object Detection: Train-


ing and Inference. https://imageai.readthedocs.io/en/latest/
customdetection/index.html.

17. D. Pereira (2020). A brief introduction to Au-


toML. https : / / towardsdatascience . com /
a-brief-introduction-to-automl-4854c76877b6.

18. S. Pulagam (2020). A Simplified approach using PyCaret


for Anomaly. https : / / towardsdatascience . com /
a-simplified-approach-using-pycaret-for-anomaly-detection-7d33aca3f0

19. E. Real, C. Liang, D. So, and Q. Le, Automl-zero: evolving machine learning algo-
rithms from scratch. In International Conference on Machine Learning. PMLR, 2020.

20. J. Redmon and A. Farhadi (2018). Yolov3: An incremental improvement. arXiv


preprint arXiv:1804.02767.

21. S. Sharma, A. Aggarwal, and T. Choudhury, Breast cancer detection using machine
learning algorithms. In 2018 International Conference on Computational Techniques,
Electronics and Mechanical Systems (CTEMS). IEEE, 2018.

22. P. K. Singh, A. K. Kar, Y. Singh, M. H. Kolekar, and S. Tanwar, Proceedings of


ICRIC 2019: Recent Innovations in Computing, volume 597. Springer Nature, 2019.

23. U. Subbiah, D. K. Kumar, S. K. Thangavel, and L. Parameswaran, An extensive


study and comparison of the various approaches to object detection using deep learning.
In 2020 International Conference on Smart Electronics and Communication (ICOSEC).
IEEE, 2020.

24. M. Teng, Anomaly detection on time series. In 2010 IEEE International Conference on
Progress in Informatics and Computing, volume 1. IEEE, 2010.

25. Z. THORAT, B. SUMANTH, V. AGAWANE&, and S. BHOSALE (). Smart traffic


control using object detection based on image ai.

26. C. Zhang, D. Song, Y. Chen, X. Feng, C. Lumezanu, W. Cheng, J. Ni, B. Zong,


H. Chen, and N. V. Chawla, A deep neural network for unsupervised anomaly detection
and diagnosis in multivariate time series data. In Proceedings of the AAAI Conference
on Artificial Intelligence, volume 33. 2019.

27. J. Zhao and X.-H. Dang, Bank customer churn prediction based on support vector
machine: Taking a commercial bank’s vip customer churn as the example. In 2008
4th International Conference on Wireless Communications, Networking and Mobile
Computing. IEEE, 2008.

38

You might also like