{"id":13472791,"url":"https://github.com/Fengrui-Liu/StreamAD","last_synced_at":"2025-03-26T17:31:16.975Z","repository":{"id":36955887,"uuid":"313169703","full_name":"Fengrui-Liu/StreamAD","owner":"Fengrui-Liu","description":"Online anomaly detection for data streams/ Real-time anomaly detection for time series data. ","archived":false,"fork":false,"pushed_at":"2023-05-11T10:04:43.000Z","size":32489,"stargazers_count":120,"open_issues_count":3,"forks_count":23,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-01T00:48:33.207Z","etag":null,"topics":["anomaly-detection","data-stream-processing","data-streams","incremental-learning","machine-learning","online-learning","outlier-detection","python","real-time-detection","streaming","time-series","timeseries"],"latest_commit_sha":null,"homepage":"https://streamad.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fengrui-Liu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-11-16T02:22:00.000Z","updated_at":"2025-02-26T10:05:00.000Z","dependencies_parsed_at":"2024-01-13T18:17:25.397Z","dependency_job_id":"8317ecc9-37c7-41fd-b903-c8a7f7195c38","html_url":"https://github.com/Fengrui-Liu/StreamAD","commit_stats":{"total_commits":227,"total_committers":6,"mean_commits":"37.833333333333336","dds":0.06167400881057272,"last_synced_commit":"7e93bac803a9cdf06830dc31e1a27ae6a3777ce1"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fengrui-Liu%2FStreamAD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fengrui-Liu%2FStreamAD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fengrui-Liu%2FStreamAD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fengrui-Liu%2FStreamAD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fengrui-Liu","download_url":"https://codeload.github.com/Fengrui-Liu/StreamAD/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245702234,"owners_count":20658570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anomaly-detection","data-stream-processing","data-streams","incremental-learning","machine-learning","online-learning","outlier-detection","python","real-time-detection","streaming","time-series","timeseries"],"created_at":"2024-07-31T16:00:58.038Z","updated_at":"2025-03-26T17:31:16.008Z","avatar_url":"https://github.com/Fengrui-Liu.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# StreamAD\n\n![StreamAD Logo](docs/source/images/logo_htmlwithname.svg)\n\n\n\nAnomaly detection for data streams/time series. Detectors process the univariate or multivariate data one by one to simulte a real-time scene.\n\n\n\n[Documentation](https://streamad.readthedocs.io/en/latest/)\n\n\n\u003c!--- BADGES: START ---\u003e\n\n\n\n![PyPI](https://img.shields.io/pypi/v/streamad)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/StreamAD?style=flat)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/streamad)\n\n![Read the Docs](https://img.shields.io/readthedocs/streamad?style=flat)\n![GitHub](https://img.shields.io/github/license/Fengrui-Liu/StreamAD)\n[![Downloads](https://static.pepy.tech/personalized-badge/streamad?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=orange\u0026left_text=Downloads)](https://pepy.tech/project/streamad)\n\n\n![example workflow](https://github.com/Fengrui-Liu/StreamAD/actions/workflows/testing.yml//badge.svg)\n[![codecov](https://codecov.io/gh/Fengrui-Liu/StreamAD/branch/main/graph/badge.svg?token=AQG26L2RA7)](https://codecov.io/gh/Fengrui-Liu/StreamAD)\n[![Maintainability](https://api.codeclimate.com/v1/badges/525d7e3663ee4c5c0daa/maintainability)](https://codeclimate.com/github/Fengrui-Liu/StreamAD/maintainability)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FFengrui-Liu%2FStreamAD.svg?type=small)](https://app.fossa.com/projects/git%2Bgithub.com%2FFengrui-Liu%2FStreamAD?ref=badge_small)\n\n\n\n---\n\n\n\n## Installation\n\nThe stable version can be installed from PyPI:\n\n```bash\npip install streamad\n```\n\nThe development version can be installed from GitHub:\n\n```bash\npip install git+https://github.com/Fengrui-Liu/StreamAD\n```\n\n---\n\n## Quick Start\n\nStart once detection within 5 lines of code. You can find more example with visualization results [here](https://streamad.readthedocs.io/en/latest/example/example.html).\n\n```python\nfrom streamad.util import StreamGenerator, UnivariateDS\nfrom streamad.model import SpotDetector\n\nds = UnivariateDS()\nstream = StreamGenerator(ds.data)\nmodel = SpotDetector()\n\nfor x in stream.iter_item():\n    score = model.fit_score(x)\n```\n\n## Models\n\n### For univariate time series\n\nIf you want to detect multivarite time series with these models, you need to apply them on each feature separately.\n\n| Model Example                                                                                                     | API Usage                                                                                                         | Paper                                                                                                                                                                                                         |\n| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [KNNCAD](https://streamad.readthedocs.io/en/latest/example/univariate.html#knncad-detector)                       | [streamad.model.KNNDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#knndetector)       | [Conformalized density- and distance-based anomaly detection in time-series data](https://arxiv.org/abs/1608.04585)                                                                                           |\n| [SPOT](https://streamad.readthedocs.io/en/latest/example/univariate.html#spot-detector)                           | [streamad.model.SpotDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#spotdetector)     | [Anomaly detection in streams with extreme value theory](https://dl.acm.org/doi/10.1145/3097983.3098144)                                                                                                      |\n| [Spectral Residual](https://streamad.readthedocs.io/en/latest/example/univariate.html#spectral-residual-detector) | [streamad.model.SRDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#srdetector)         | [Time-series anomaly detection service at microsoft](https://arxiv.org/abs/1906.03821)                                                                                                                        |\n| [Z score](https://streamad.readthedocs.io/en/latest/example/univariate.html#z-score-detector)                     | [streamad.model.ZScoreDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#zscoredetector) | [Standard score](https://en.wikipedia.org/wiki/Standard_score)                                                                                                                                                |\n| [One-class SVM](https://streamad.readthedocs.io/en/latest/example/univariate.html#one-class-svm-detector)         | [streamad.model.OCSVMDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#ocsvmdetector)   | [One-class SVM](https://en.wikipedia.org/w/index.php?title=One-class_classification\u0026oldid=1098733917)                                                                                                         |\n| [MAD](https://streamad.readthedocs.io/en/latest/example/univariate.html#median-absolute-deviation-detector)       | [streamad.model.MadDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#maddetector)       | [Median absolute deviation](https://www.influxdata.com/blog/anomaly-detection-with-median-absolute-deviation/#:~:text=How%20Median%20Absolute%20Deviation%20algorithm,time%20series%20at%20that%20timestamp/) |\n| [SARIMAX](https://streamad.readthedocs.io/en/latest/example/univariate.html#seasonal-arima-detector)              | [streamad.model.SArimaDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#sarimadetector) | [Seasonal Arima Detector](https://www.statsmodels.org/dev/generated/statsmodels.tsa.statespace.sarimax.SARIMAX.html?highlight=sarimax#statsmodels.tsa.statespace.sarimax.SARIMAX)                             |\n\n### For multivariate time series\n\nThese models are compatible with univariate time series.\n\n\n\n| Models Example                                                                                         | API Usage                                                                                                          | Paper                                                                                                                                                                     |\n| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [xStream](https://streamad.readthedocs.io/en/latest/example/multivariate.html#xstream-detector)        | [streamad.model.xStramDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#xstreamdetector) | [Xstream: outlier detection in feature-evolving data streams](http://www.kdd.org/kdd2018/accepted-papers/view/xstream-outlier-detection-in-feature-evolving-data-streams) |\n| [RShash](https://streamad.readthedocs.io/en/latest/example/multivariate.html#rshash-detector)          | [streamad.model.RShashDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#rshashdetector)  | [Subspace Outlier Detection in Linear Time with Randomized Hashing](https://ieeexplore.ieee.org/document/7837870)                                                         |\n| [HSTree](https://streamad.readthedocs.io/en/latest/example/multivariate.html#half-space-tree-detector) | [streamad.model.HSTreeDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#hstreedetector)  | [Fast Anomaly Detection for Streaming Data](https://www.ijcai.org/Proceedings/11/Papers/254.pdf)                                                                          |\n| [LODA](https://streamad.readthedocs.io/en/latest/example/multivariate.html#loda-detector)              | [streamad.model.LodaDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#lodadetector)      | [Lightweight on-line detector of anomalies](https://link.springer.com/article/10.1007/s10994-015-5521-0)                                                                  |\n| [RRCF](https://streamad.readthedocs.io/en/latest/example/univariate.html#rrcf-detector)                | [streamad.model.RrcfDetector](https://streamad.readthedocs.io/en/latest/api/streamad.model.html#rrcfdetector)      | [Robust random cut forest based anomaly detection on streams](http://proceedings.mlr.press/v48/guha16.pdf)                                                                |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFengrui-Liu%2FStreamAD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFengrui-Liu%2FStreamAD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFengrui-Liu%2FStreamAD/lists"}