_images/logo.png

Python Streaming Anomaly Detection (PySAD)

PyPI GitHub release (latest by date) Documentation status Gitter Azure Pipelines Build Status Travis CI Build Status Appveyor Build status Circle CI Coverage Status PyPI - Python Version Supported Platforms License

PySAD is an open-source python framework for anomaly detection on streaming multivariate data.

Documentation


Features

Online Anomaly Detection

PySAD provides methods for online/sequential anomaly detection, i.e. anomaly detection on streaming data, where model updates itself as a new instance arrives.

Resource-Efficient

Streaming methods efficiently handle the limitied memory and processing time requirements of the data streams so that they can be used in near real-time. The methods can only store an instance or a small window of recent instances.

Complete

PySAD contains stream simulators, evaluators, preprocessors, statistic trackers, postprocessors, probability calibrators and more. In addition to streaming models, PySAD also provides integrations for batch anomaly detectors of the PyOD so that they can be used in the streaming setting.

Comprehensive

PySAD serves models that are specifically designed for both univariate and multivariate data. Furthermore, one can experiment via PySAD in supervised, semi-supervised and unsupervised setting.

User Friendly

Users with any experience level can easily use PySAD. One can easily design experiments and combine the tools in the framework. Moreover, the existing methods in PySAD are easy to extend.

Free and Open Source Software (FOSS)

PySAD is distributed under BSD License 2.0 and favors FOSS principles.


Installation

The PySAD framework can be installed via:

pip install -U pysad

Alternatively, you can install the library directly using the source code in Github repository by:

git clone https://github.com/selimfirat/pysad.git
cd pysad
pip install .

Required Dependencies:

  • Python 3.8

  • numpy==1.23.5

  • scikit-learn>=1.3.0

  • scipy==1.10.0

  • pyod==1.1.0

  • combo==0.1.3

Optional Dependencies:



Versioning

Semantic versioning is used for this project.


License

This project is licensed under the BSD License 2.0.

BSD 3-Clause License

Copyright (c) 2023, Selim Firat Yilmaz
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Citing PySAD

If you use PySAD for a scientific publication, please cite the following paper:

@article{pysad,
  title={PySAD: A Streaming Anomaly Detection Framework in Python},
  author={Yilmaz, Selim F and Kozat, Suleyman S},
  journal={arXiv preprint arXiv:2009.02572},
  year={2020}
}