pyriodicity


Namepyriodicity JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://pyriodicity.readthedocs.io
SummaryPyriodicity provides an intuitive and easy-to-use Python implementation for periodicity detection in univariate signals.
upload_time2025-01-01 23:40:21
maintainerNone
docs_urlNone
authorIskander Gaba
requires_python<4.0,>=3.10
licenseMIT
keywords period periodicity seasonality period-detection periodicity-analysis seasonality-analysis autoperiod cfd-autoperiod robustperiod signal-processing time-series-analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            <div align="center">
<h1>Pyriodicity</h1>

[![PyPI Version](https://img.shields.io/pypi/v/pyriodicity.svg?label=PyPI)](https://pypi.org/project/pyriodicity/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyriodicity?label=Python)
![GitHub License](https://img.shields.io/github/license/iskandergaba/pyriodicity?label=License)
[![Codecov](https://codecov.io/gh/iskandergaba/pyriodicity/graph/badge.svg?token=D5F3PKSOEK)](https://codecov.io/gh/iskandergaba/pyriodicity)
[![Docs](https://readthedocs.org/projects/pyriodicity/badge/?version=latest)](https://pyriodicity.readthedocs.io/en/latest)
[![CI Build](https://github.com/iskandergaba/pyriodicity/actions/workflows/ci.yml/badge.svg)](https://github.com/iskandergaba/pyriodicity/actions/workflows/ci.yml)
</div>

## About Pyriodicity
Pyriodicity provides an intuitive and easy-to-use Python implementation for periodicity detection in univariate signals. Pyriodicity supports the following detection methods:
- [Autocorrelation Function (ACF)](https://otexts.com/fpp3/acf.html)
- [Autoperiod](https://doi.org/10.1137/1.9781611972757.40)
- [CFD-Autoperiod](https://doi.org/10.1007/978-3-030-39098-3_4)
- [Fast Fourier Transform (FFT)](https://otexts.com/fpp3/useful-predictors.html#fourier-series)
- [RobustPeriod](https://doi.org/10.1145/3448016.3452779)

## Installation
To install the latest version of `pyriodicity`, simply run:

```shell
pip install pyriodicity
```

## Usage
Please refer to the [package documentation](https://pyriodicity.readthedocs.io) for more information.

For this example, start by loading Mauna Loa Weekly Atmospheric CO2 Data from [`statsmodels`](https://www.statsmodels.org) and downsampling its data to a monthly frequency.
```python
>>> from statsmodels.datasets import co2
>>> data = co2.load().data
>>> data = data.resample("ME").mean().ffill()
```

Use `Autoperiod` to find the list of periods based in this data (if any).
```python
>>> from pyriodicity import Autoperiod
>>> Autoperiod.detect(data)
array([12])
```

The detected periodicity length is 12 which suggests a strong yearly seasonality given that the data has a monthly frequency.

All the supported estimation algorithms can be used in the same manner as in the example above with different optional parameters. Check the [API Reference](https://pyriodicity.readthedocs.io/en/stable/api.html) for more details.

## References
- [1] Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts: Melbourne, Australia. [OTexts.com/fpp3](https://otexts.com/fpp3). Accessed on 09-15-2024.
- [2] Vlachos, M., Yu, P., & Castelli, V. (2005). On periodicity detection and Structural Periodic similarity. Proceedings of the 2005 SIAM International Conference on Data Mining. [doi.org/10.1137/1.9781611972757.40](https://doi.org/10.1137/1.9781611972757.40).
- [3] Puech, T., Boussard, M., D'Amato, A., & Millerand, G. (2020). A fully automated periodicity detection in time series. In Advanced Analytics and Learning on Temporal Data: 4th ECML PKDD Workshop, AALTD 2019, Würzburg, Germany, September 20, 2019, Revised Selected Papers 4 (pp. 43-54). Springer International Publishing. [doi.org/10.1007/978-3-030-39098-3_4](https://doi.org/10.1007/978-3-030-39098-3_4).
- [4] Wen, Q., He, K., Sun, L., Zhang, Y., Ke, M., & Xu, H. (2021, June). RobustPeriod: Robust time-frequency mining for multiple periodicity detection. In Proceedings of the 2021 international conference on management of data (pp. 2328-2337). [https://doi.org/10.1145/3448016.3452779](https://doi.org/10.1145/3448016.3452779).

            

Raw data

            {
    "_id": null,
    "home_page": "https://pyriodicity.readthedocs.io",
    "name": "pyriodicity",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "period, periodicity, seasonality, period-detection, periodicity-analysis, seasonality-analysis, autoperiod, cfd-autoperiod, robustperiod, signal-processing, time-series-analysis",
    "author": "Iskander Gaba",
    "author_email": "iskander@hey.com",
    "download_url": "https://files.pythonhosted.org/packages/16/61/cebcdce2fccc2f41d9e37cb9c19993969dc9776bb863360d0364f6bb70fa/pyriodicity-0.4.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n<h1>Pyriodicity</h1>\n\n[![PyPI Version](https://img.shields.io/pypi/v/pyriodicity.svg?label=PyPI)](https://pypi.org/project/pyriodicity/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyriodicity?label=Python)\n![GitHub License](https://img.shields.io/github/license/iskandergaba/pyriodicity?label=License)\n[![Codecov](https://codecov.io/gh/iskandergaba/pyriodicity/graph/badge.svg?token=D5F3PKSOEK)](https://codecov.io/gh/iskandergaba/pyriodicity)\n[![Docs](https://readthedocs.org/projects/pyriodicity/badge/?version=latest)](https://pyriodicity.readthedocs.io/en/latest)\n[![CI Build](https://github.com/iskandergaba/pyriodicity/actions/workflows/ci.yml/badge.svg)](https://github.com/iskandergaba/pyriodicity/actions/workflows/ci.yml)\n</div>\n\n## About Pyriodicity\nPyriodicity provides an intuitive and easy-to-use Python implementation for periodicity detection in univariate signals. Pyriodicity supports the following detection methods:\n- [Autocorrelation Function (ACF)](https://otexts.com/fpp3/acf.html)\n- [Autoperiod](https://doi.org/10.1137/1.9781611972757.40)\n- [CFD-Autoperiod](https://doi.org/10.1007/978-3-030-39098-3_4)\n- [Fast Fourier Transform (FFT)](https://otexts.com/fpp3/useful-predictors.html#fourier-series)\n- [RobustPeriod](https://doi.org/10.1145/3448016.3452779)\n\n## Installation\nTo install the latest version of `pyriodicity`, simply run:\n\n```shell\npip install pyriodicity\n```\n\n## Usage\nPlease refer to the [package documentation](https://pyriodicity.readthedocs.io) for more information.\n\nFor this example, start by loading Mauna Loa Weekly Atmospheric CO2 Data from [`statsmodels`](https://www.statsmodels.org) and downsampling its data to a monthly frequency.\n```python\n>>> from statsmodels.datasets import co2\n>>> data = co2.load().data\n>>> data = data.resample(\"ME\").mean().ffill()\n```\n\nUse `Autoperiod` to find the list of periods based in this data (if any).\n```python\n>>> from pyriodicity import Autoperiod\n>>> Autoperiod.detect(data)\narray([12])\n```\n\nThe detected periodicity length is 12 which suggests a strong yearly seasonality given that the data has a monthly frequency.\n\nAll the supported estimation algorithms can be used in the same manner as in the example above with different optional parameters. Check the [API Reference](https://pyriodicity.readthedocs.io/en/stable/api.html) for more details.\n\n## References\n- [1] Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts: Melbourne, Australia. [OTexts.com/fpp3](https://otexts.com/fpp3). Accessed on 09-15-2024.\n- [2] Vlachos, M., Yu, P., & Castelli, V. (2005). On periodicity detection and Structural Periodic similarity. Proceedings of the 2005 SIAM International Conference on Data Mining. [doi.org/10.1137/1.9781611972757.40](https://doi.org/10.1137/1.9781611972757.40).\n- [3] Puech, T., Boussard, M., D'Amato, A., & Millerand, G. (2020). A fully automated periodicity detection in time series. In Advanced Analytics and Learning on Temporal Data: 4th ECML PKDD Workshop, AALTD 2019, W\u00fcrzburg, Germany, September 20, 2019, Revised Selected Papers 4 (pp. 43-54). Springer International Publishing. [doi.org/10.1007/978-3-030-39098-3_4](https://doi.org/10.1007/978-3-030-39098-3_4).\n- [4] Wen, Q., He, K., Sun, L., Zhang, Y., Ke, M., & Xu, H. (2021, June). RobustPeriod: Robust time-frequency mining for multiple periodicity detection. In Proceedings of the 2021 international conference on management of data (pp. 2328-2337). [https://doi.org/10.1145/3448016.3452779](https://doi.org/10.1145/3448016.3452779).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pyriodicity provides an intuitive and easy-to-use Python implementation for periodicity detection in univariate signals.",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://pyriodicity.readthedocs.io",
        "Repository": "https://github.com/iskandergaba/pyriodicity"
    },
    "split_keywords": [
        "period",
        " periodicity",
        " seasonality",
        " period-detection",
        " periodicity-analysis",
        " seasonality-analysis",
        " autoperiod",
        " cfd-autoperiod",
        " robustperiod",
        " signal-processing",
        " time-series-analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d46adb8f5d396c849b2ed5b63f9fcdaf03ba4e7b4c438834d101a3c90fc15167",
                "md5": "19e860cf11a9ec1734ad7663bceac350",
                "sha256": "89fb7dfcdadebc33a76ee47d0de2892b5660d77e4be04bcae9bfd5fad85a7a61"
            },
            "downloads": -1,
            "filename": "pyriodicity-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "19e860cf11a9ec1734ad7663bceac350",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 21311,
            "upload_time": "2025-01-01T23:40:18",
            "upload_time_iso_8601": "2025-01-01T23:40:18.231610Z",
            "url": "https://files.pythonhosted.org/packages/d4/6a/db8f5d396c849b2ed5b63f9fcdaf03ba4e7b4c438834d101a3c90fc15167/pyriodicity-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1661cebcdce2fccc2f41d9e37cb9c19993969dc9776bb863360d0364f6bb70fa",
                "md5": "267fc402584b980c8222a53959a41ac1",
                "sha256": "e9a215b56eb70c54f33ab175d0ae5b26dbc50fdeede9a43fa7e8e8cd68db1f88"
            },
            "downloads": -1,
            "filename": "pyriodicity-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "267fc402584b980c8222a53959a41ac1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 15209,
            "upload_time": "2025-01-01T23:40:21",
            "upload_time_iso_8601": "2025-01-01T23:40:21.321183Z",
            "url": "https://files.pythonhosted.org/packages/16/61/cebcdce2fccc2f41d9e37cb9c19993969dc9776bb863360d0364f6bb70fa/pyriodicity-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-01 23:40:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iskandergaba",
    "github_project": "pyriodicity",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "pyriodicity"
}
        
Elapsed time: 0.46334s