{"id":13415301,"url":"https://github.com/tsurubee/banpei","last_synced_at":"2026-03-13T04:38:27.331Z","repository":{"id":58043106,"uuid":"104569445","full_name":"tsurubee/banpei","owner":"tsurubee","description":"Anomaly detection library based on singular spectrum transformation(sst)","archived":false,"fork":false,"pushed_at":"2020-09-21T14:00:06.000Z","size":811,"stargazers_count":301,"open_issues_count":0,"forks_count":47,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-07-31T21:53:38.461Z","etag":null,"topics":["anomaly-detection","python","time-series-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsurubee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-23T13:27:30.000Z","updated_at":"2024-06-11T22:59:40.000Z","dependencies_parsed_at":"2022-08-29T23:30:27.625Z","dependency_job_id":null,"html_url":"https://github.com/tsurubee/banpei","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsurubee%2Fbanpei","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsurubee%2Fbanpei/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsurubee%2Fbanpei/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsurubee%2Fbanpei/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsurubee","download_url":"https://codeload.github.com/tsurubee/banpei/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658057,"owners_count":20326459,"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","python","time-series-analysis"],"created_at":"2024-07-30T21:00:46.784Z","updated_at":"2026-03-13T04:38:27.294Z","avatar_url":"https://github.com/tsurubee.png","language":"Python","funding_links":[],"categories":["异常检测包","工具箱与数据集","Anomaly Detection Software"],"sub_categories":["3.2 时间序列异常检测"],"readme":"## Banpei\n[![Build Status](https://travis-ci.org/tsurubee/banpei.svg?branch=master)](https://travis-ci.org/tsurubee/banpei)  \n\nBanpei is a Python package of the anomaly detection.  \nAnomaly detection is a technique used to identify unusual patterns that do not conform to expected behavior.\n\n## System\nPython ^3.6 (2.x is not supported)\n\n## Installation\n```bash\n$ pip install banpei\n```\nAfter installation, you can import banpei in Python.\n```\n$ python\n\u003e\u003e\u003e import banpei\n```\n\n## Usage\n#### Example\n*Singular spectrum transformation(sst)*\n```python\nimport banpei \nmodel   = banpei.SST(w=50)\nresults = model.detect(data)\n```\nThe input 'data' must be one-dimensional array-like object containing a sequence of values.  \nThe output 'results' is Numpy array with the same size as input data.  \nThe graph below shows the change-point scoring calculated by sst for the periodic data.\n\n\u003cimg src=\"./docs/images/sst_example.png\" alt=\"sst_example\" width=\"700\"\u003e\n\nThe data used is placed as '/tests/test_data/periodic_wave.csv'.  You can read a CSV file using the following code.  \n```python\nimport pandas as pd\nraw_data = pd.read_csv('./tests/test_data/periodic_wave.csv')\ndata = raw_data['y']\n```\n\nSST processing can be accelerated using the Lanczos method which is one of Krylov subspace methods by specifying `True` for the `is_lanczos` argument like below.  \n```python\nresults = model.detect(data, is_lanczos=True)\n```\n\n## Real-time monitoring with Bokeh\nBanpei is developed with the goal of constructing the environment of real-time abnormality monitoring.  In order to achieve the goal, Banpei has the function corresponded to the streaming data.  With the help of Bokeh, which is great visualization library, we can construct the simple monitoring tool.   \nHere's a simple demonstration movie of change-point detection of the data trends.\n\n[![sst detection](https://img.youtube.com/vi/7_woubLAhXk/0.jpg)](https://www.youtube.com/watch?v=7_woubLAhXk)  \nhttps://youtu.be/7_woubLAhXk  \nThe sample code how to construct real-time monitoring environment is placed in '/demo' folder.\n\n## The implemented algorithm\n#### Outlier detection\n* Hotelling's theory\n#### Change point detection\n* Singular spectrum transformation(sst)\n\n## License\nThis project is licensed under the terms of the MIT license, see LICENSE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsurubee%2Fbanpei","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsurubee%2Fbanpei","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsurubee%2Fbanpei/lists"}