Package: anomalearn
anomalearn: time series anomaly detection libraryGroupBadgesPyPIRepositoryCodeDocstringsStatusThe current version of the library (first version) is a pre-release because
other content is planned to be added, i.e., the library is currently on
development. However, we feel that people can start to use it and contribute to
it. Please refer to the documentation for contribution and use.What is it?anomalearn is aPythonpackage that provides modular and
extensible functionalities for developing anomaly detection methods for time
series data, reading publicly available time series anomaly detection datasets,
creating the loading of data for experiments, and dataset evaluation functions.
Additionally, anomalearn development's plans include the implementation of
several state-of-the-art and historical anomaly detection methods, and the
implementation of objects to automate the training process of methods. See
Discussion and development section for more details.DocumentationEvery functionality in anomalearn is documented. The official documentation is
hosted athttps://marcopetri98.github.io/anomalearn/index.html.Main featuresHere you find a list of the features offered by anomalearn:Implementation of state-of-the-art and historical anomaly detection methods
for time series. The bare models are located inanomalearn.algorithms.models.
Where bare models mean the model without the preprocessing or postprocessing
operations.Implementation of data readers of commonly used publicly accessible time
series anomaly detection datasets. Data readers are all located in the packageanomalearn.readeror inanomalearn.reader.time_series. All data
readers return apandasDataFrame.Implementation of some data analysis functions, such as simplicity scoring
functions, stationarity tests and time series decomposition functions. These
functions are all located inanomalearn.analysis.Implementation of helpers for creating experiments. Currently, only the
helper for data loading has been implemented capable of taking data readers
and returning all or a subset of series with a default or specific split. The
experiment helpers are all located inanomalearn.applications.InstallationThe source code is available atanomalearn github repo.Currently, the library is shipped only to thePython Package Index (PyPI).# install from PyPIpipinstallanomalearn--preInstallation from sourceFirstly, download or clone the repository and place it in any location on your
computer. We will call REPO_PATH. Open the terminal and navigate to the folder:cdREPO_PATHSecondly, install the repository using pip:pipinstall.DependenciesThis repository is strongly based on other existing high-quality Python packages
for machine learning and for general programming:Numpy: adds support for efficient array operations.Scipy: adds support for scientific computing.Numba: adds a Just In Time compiler for functions that have
to be efficient and leaves the package a pure Python package.Pandas: adds support for working with data structures.Scikit-learn: adds support for model development.Scikit-optimize: adds support for searching hyper-parameters
of models.Statsmodels: adds support for statistical tests and
models.Matplotlib: adds supports for plotting.Getting helpFor the moment, the suggested way to get help is by posting questions toStackOverflow. Then, until the community will grow
bigger, consider sending the URL of the questions to the author via email.BackgroundThis work started with Marco Petri's thesis work. The work initially aimed to
develop new anomaly detection methods for time series to reach new
state-of-the-art performances. However, given the scarcity of tools specifically
aimed for time series anomaly detection, the thesis developed anomalearn and a
way to evaluate the simplicity of a dataset. The very first version of the
library (v0.0.2a1) is the one presented and described on the thesis. From that
point on, the library will receive updates outside the sole scope of the thesis.Discussion and developmentCurrently, the development of the first stable version of anomalearn is ongoing.
If you want to use it, you can help us in testing the functionalities by
providing feedback on the clarity of the documentation, the naming of functions,
ease of use, and in proposing new functionalities to implement.In the future, once the first stable version will be published, a structured and
well documented on how to contribute to the library will be written. For the
moment, all the discussions related to the development, requests and proposals
should be places in the GitHub discussion page.Contributing to codeFirstly, download or clone the repository and place it in any location on your
computer. We will call REPO_PATH. Open the terminal and navigate to the folder:cdREPO_PATHThe library usespoetryfor managing dependencies, building,
and publishing. Therefore, it is strongly recommended to carefully read its docs
to be able to contribute and install it from source.Be careful, the installed
version of poetry must be at least 1.4.1.poetryinitNow, poetry will recognize the project. You can install the library and its
dependencies by using the poetry lock file such that every contributor will use
the exact same versions of packages:# this command will install the library using the lock filepoetryinstallNow, you can add functionalities to the library. To ask for changes to be
merged, create a pull request. However,it is strongly suggested to ask if a
feature can be implemented in anomalearn such that it does not violate any
design choice.CitationCurrently, neither the thesis has been published nor a paper presenting the
library to a conference or in a journal has been published. I strongly ask you
to wait till the 4th of May 2023 to get the citation (the date on which the
dissertation will happen and the thesis will be published).