# Welcome to Roerich
[![PyPI version](https://badge.fury.io/py/roerich.svg)](https://badge.fury.io/py/roerich)
[![Documentation](https://img.shields.io/badge/documentation-yes-green.svg)](https://hse-lambda.github.io/roerich)
[![Downloads](https://pepy.tech/badge/roerich)](https://pepy.tech/project/roerich)
[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
`Roerich` is a python library for online and offline change point detection for time series analysis, signal processing, and segmentation. It was named after the painter Nicholas Roerich, known as the Master of the Mountains. Read more at: https://www.roerich.org.
![](https://raw.githubusercontent.com/HSE-LAMBDA/roerich/main/images/700125v1.jpeg)
_Fragment of "Himalayas", 1933_
Currently, the library contains official implementations of change point detection algorithms based on direct density ratio estimation from the following articles:
- Mikhail Hushchyn and Andrey Ustyuzhanin. “Generalization of Change-Point Detection in Time Series Data Based on Direct Density Ratio Estimation.” J. Comput. Sci. 53 (2021): 101385. [[journal]](https://doi.org/10.1016/j.jocs.2021.101385) [[arxiv]](https://doi.org/10.48550/arXiv.2001.06386)
- Mikhail Hushchyn, Kenenbek Arzymatov and Denis Derkach. “Online Neural Networks for Change-Point Detection.” ArXiv abs/2010.01388 (2020). [[arxiv]](https://doi.org/10.48550/arXiv.2010.01388)
## Dependencies and install
```
pip install roerich
```
or
```python
git clone https://github.com/HSE-LAMBDA/roerich.git
cd roerich
pip install -e .
```
## Basic usage
(See more examples in the [documentation](https://hse-lambda.github.io/roerich).)
The following code snippet generates a noisy synthetic data, performs change point detection, and displays the results. If you use own dataset, make
sure that it has a shape `(seq_len, n_dims)`.
```python
import roerich
from roerich.change_point import ChangePointDetectionClassifier
# generate time series
X, cps_true = roerich.generate_dataset(period=200, N_tot=2000)
# detection
# base_classifier = 'logreg', 'qda', 'dt', 'rf', 'mlp', 'knn', 'nb'
# metric = 'klsym', 'pesym', 'jsd', 'mmd', 'fd'
cpd = ChangePointDetectionClassifier(base_classifier='mlp', metric='klsym', window_size=100)
score, cps_pred = cpd.predict(X)
# visualization
roerich.display(X, cps_true, score, cps_pred)
```
![](https://raw.githubusercontent.com/HSE-LAMBDA/roerich/main/images/demo.png)
## Support
- Home: [https://github.com/HSE-LAMBDA/roerich](https://github.com/HSE-LAMBDA/roerich)
- Documentation: [https://hse-lambda.github.io/roerich](https://hse-lambda.github.io/roerich)
- For any usage questions, suggestions and bugs use the [issue page](https://github.com/HSE-LAMBDA/roerich/issues), please.
## Related libraries
[![Generic badge](https://img.shields.io/badge/^.^-ruptures-blue.svg)](https://github.com/deepcharles/ruptures)
[![Generic badge](https://img.shields.io/badge/^.^-klcpd-blue.svg)](https://github.com/HolyBayes/klcpd)
[![Generic badge](https://img.shields.io/badge/^.^-tire-blue.svg)](https://github.com/HolyBayes/TIRE_pytorch)
[![Generic badge](https://img.shields.io/badge/^.^-bocpd-blue.svg)](https://github.com/hildensia/bayesian_changepoint_detection)
## Thanks to all our contributors
<a href="https://github.com/HSE-LAMBDA/roerich/graphs/contributors">
<img src="https://contributors-img.web.app/image?repo=HSE-LAMBDA/roerich" />
</a>
Raw data
{
"_id": null,
"home_page": "https://github.com/HSE-LAMBDA/roerich",
"name": "roerich",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "python,machine learning,neural networks,signal processing,segmentation,time series analysis,anomaly detection,change point detection,density ratio",
"author": "Mikhail Hushchyn, Kenenbek Arzymatov",
"author_email": "hushchyn.mikhail@gmail.com, kenenbek@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/24/47/3937b28ea505a13e813260803544bcc404497bcaac4be3e1b74c447cc361/roerich-0.6.0.tar.gz",
"platform": null,
"description": "# Welcome to Roerich\n\n[![PyPI version](https://badge.fury.io/py/roerich.svg)](https://badge.fury.io/py/roerich)\n[![Documentation](https://img.shields.io/badge/documentation-yes-green.svg)](https://hse-lambda.github.io/roerich)\n[![Downloads](https://pepy.tech/badge/roerich)](https://pepy.tech/project/roerich)\n[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n\n`Roerich` is a python library for online and offline change point detection for time series analysis, signal processing, and segmentation. It was named after the painter Nicholas Roerich, known as the Master of the Mountains. Read more at: https://www.roerich.org.\n\n![](https://raw.githubusercontent.com/HSE-LAMBDA/roerich/main/images/700125v1.jpeg)\n_Fragment of \"Himalayas\", 1933_\n\nCurrently, the library contains official implementations of change point detection algorithms based on direct density ratio estimation from the following articles:\n\n- Mikhail Hushchyn and Andrey Ustyuzhanin. \u201cGeneralization of Change-Point Detection in Time Series Data Based on Direct Density Ratio Estimation.\u201d J. Comput. Sci. 53 (2021): 101385. [[journal]](https://doi.org/10.1016/j.jocs.2021.101385) [[arxiv]](https://doi.org/10.48550/arXiv.2001.06386)\n- Mikhail Hushchyn, Kenenbek Arzymatov and Denis Derkach. \u201cOnline Neural Networks for Change-Point Detection.\u201d ArXiv abs/2010.01388 (2020). [[arxiv]](https://doi.org/10.48550/arXiv.2010.01388)\n\n## Dependencies and install\n\n```\npip install roerich\n```\nor\n```python\ngit clone https://github.com/HSE-LAMBDA/roerich.git\ncd roerich\npip install -e .\n```\n\n## Basic usage\n\n(See more examples in the [documentation](https://hse-lambda.github.io/roerich).)\n\nThe following code snippet generates a noisy synthetic data, performs change point detection, and displays the results. If you use own dataset, make\nsure that it has a shape `(seq_len, n_dims)`.\n```python\nimport roerich\nfrom roerich.change_point import ChangePointDetectionClassifier\n\n# generate time series\nX, cps_true = roerich.generate_dataset(period=200, N_tot=2000)\n\n# detection\n# base_classifier = 'logreg', 'qda', 'dt', 'rf', 'mlp', 'knn', 'nb'\n# metric = 'klsym', 'pesym', 'jsd', 'mmd', 'fd'\ncpd = ChangePointDetectionClassifier(base_classifier='mlp', metric='klsym', window_size=100)\nscore, cps_pred = cpd.predict(X)\n\n# visualization\nroerich.display(X, cps_true, score, cps_pred)\n```\n\n![](https://raw.githubusercontent.com/HSE-LAMBDA/roerich/main/images/demo.png)\n\n## Support\n\n- Home: [https://github.com/HSE-LAMBDA/roerich](https://github.com/HSE-LAMBDA/roerich)\n- Documentation: [https://hse-lambda.github.io/roerich](https://hse-lambda.github.io/roerich)\n- For any usage questions, suggestions and bugs use the [issue page](https://github.com/HSE-LAMBDA/roerich/issues), please.\n\n## Related libraries\n\n[![Generic badge](https://img.shields.io/badge/^.^-ruptures-blue.svg)](https://github.com/deepcharles/ruptures)\n[![Generic badge](https://img.shields.io/badge/^.^-klcpd-blue.svg)](https://github.com/HolyBayes/klcpd)\n[![Generic badge](https://img.shields.io/badge/^.^-tire-blue.svg)](https://github.com/HolyBayes/TIRE_pytorch)\n[![Generic badge](https://img.shields.io/badge/^.^-bocpd-blue.svg)](https://github.com/hildensia/bayesian_changepoint_detection)\n\n## Thanks to all our contributors\n\n<a href=\"https://github.com/HSE-LAMBDA/roerich/graphs/contributors\">\n <img src=\"https://contributors-img.web.app/image?repo=HSE-LAMBDA/roerich\" />\n</a>\n\n",
"bugtrack_url": null,
"license": "BSD-2-Clause",
"summary": "Change point detection.",
"version": "0.6.0",
"project_urls": {
"Documentation": "https://hse-lambda.github.io/roerich/",
"Homepage": "https://github.com/HSE-LAMBDA/roerich",
"Source": "https://github.com/HSE-LAMBDA/roerich/"
},
"split_keywords": [
"python",
"machine learning",
"neural networks",
"signal processing",
"segmentation",
"time series analysis",
"anomaly detection",
"change point detection",
"density ratio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "10d96f2b634558bc3d2bbab7cfc3fec76f1819cf21ddcc1c794f50d7734e112b",
"md5": "0f3583f0acc6516c541e4003d15baa7a",
"sha256": "5e28671f200b2d095e9b01be51bb00217c6ecfb877d42437e7e8bf0a60808280"
},
"downloads": -1,
"filename": "roerich-0.6.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0f3583f0acc6516c541e4003d15baa7a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 36228,
"upload_time": "2023-07-17T10:48:37",
"upload_time_iso_8601": "2023-07-17T10:48:37.798115Z",
"url": "https://files.pythonhosted.org/packages/10/d9/6f2b634558bc3d2bbab7cfc3fec76f1819cf21ddcc1c794f50d7734e112b/roerich-0.6.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "24473937b28ea505a13e813260803544bcc404497bcaac4be3e1b74c447cc361",
"md5": "21316f4824ddd4738de56563009061e1",
"sha256": "10ae9791adfb4fa0d6f83261b7895c1fd45745342c14d5fef7b3d5bcbf40569c"
},
"downloads": -1,
"filename": "roerich-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "21316f4824ddd4738de56563009061e1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 22845,
"upload_time": "2023-07-17T10:48:39",
"upload_time_iso_8601": "2023-07-17T10:48:39.394233Z",
"url": "https://files.pythonhosted.org/packages/24/47/3937b28ea505a13e813260803544bcc404497bcaac4be3e1b74c447cc361/roerich-0.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-17 10:48:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "HSE-LAMBDA",
"github_project": "roerich",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "roerich"
}