{"id":32176291,"url":"https://github.com/fengrui-liu/streamad","last_synced_at":"2026-02-23T14:01:08.205Z","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":132,"open_issues_count":4,"forks_count":26,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-12T20:24:25.976Z","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-16T02:22:00.000Z","updated_at":"2026-01-12T00:00:35.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,"purl":"pkg:github/Fengrui-Liu/StreamAD","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","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fengrui-Liu%2FStreamAD/sbom","scorecard":{"id":49830,"data":{"date":"2025-08-11","repo":{"name":"github.com/Fengrui-Liu/StreamAD","commit":"d2e38f4c35349b05c9bbd3ac753efc9a96e0ab05"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/python-publish.yml:16","Warn: no topLevel permission defined: .github/workflows/testing.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/Fengrui-Liu/StreamAD/python-publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-publish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/Fengrui-Liu/StreamAD/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/Fengrui-Liu/StreamAD/testing.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/Fengrui-Liu/StreamAD/testing.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/testing.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/Fengrui-Liu/StreamAD/testing.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/testing.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/Fengrui-Liu/StreamAD/testing.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/Fengrui-Liu/StreamAD/testing.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/Fengrui-Liu/StreamAD/testing.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/testing.yml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/Fengrui-Liu/StreamAD/testing.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/testing.yml:84","Warn: pipCommand not pinned by hash: .github/workflows/testing.yml:85","Warn: pipCommand not pinned by hash: .github/workflows/testing.yml:90","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","Warn: Project is vulnerable to: PYSEC-2024-110 / GHSA-jw8x-6495-233v","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T23:30:48.331Z","repository_id":36955887,"created_at":"2025-08-14T23:30:48.331Z","updated_at":"2025-08-14T23:30:48.331Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29745111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-10-21T19:56:52.901Z","updated_at":"2026-02-23T14:01:08.198Z","avatar_url":"https://github.com/Fengrui-Liu.png","language":"Python","funding_links":[],"categories":[],"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"}