Anomalearn: a modular and extensible library for the development of time series anomaly detection models
Master Thesis
Anomaly detection is the problem of identifying abnormally and potentially dangerous or faulty behaviour. It is applied in various domains and on several data types: tabular, images, or temporal. Many current state-of-the-art anomaly detection algorithms for time series share preprocessing or postprocessing operations. Furthermore, several datasets are employed for evaluating and comparing the performance of models. Such benchmark datasets exhibit a variable degree of complexity, which may affect the evaluation of the power of the methods compared in distinct experiments. Some publicly available datasets are overly simple and their use may overestimate the power of the models tested on them. However, there is no automatic and unambiguous definition of simplicity for these datasets. The first contribution of this thesis assesses the problem of simplicity in datasets of time series anomaly detection through a formal approach. It reports a definition of simplicity for anomaly detection datasets and the definition of scores representing three different types of simplicity. It also proposes algorithms to compute these scores on datasets and the analysis of their time complexity. Secondly, although libraries have been presented for many tasks, there is still a lack of an extensible and modular library specifically developed for creating new techniques related to anomaly detection. This thesis proposes anomalearn, a library for developing new models and approaches for time series anomaly detection. It consists of a rigorous object-oriented design using UML as the first tool to describe its functioning. Furthermore, anomalearn uses an approach based on interfaces to share API design employing the Python programming language, the current standard for machine and deep learning solutions. The thesis source code can be downloaded and explored at: https://github.com/marcopetri98/2021-2022-thesis.