pyriodicity


Namepyriodicity JSON
Version 0.3.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_time2024-10-25 22:57:48
maintainerNone
docs_urlNone
authorIskander Gaba
requires_python<4.0,>=3.10
licenseMIT
keywords signal time series forecast analysis period periodicity seasonality trend cycle decomposition
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <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)

## 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 = Autoperiod(data)
>>> autoperiod.fit()
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).

            

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": "signal, time, series, forecast, analysis, period, periodicity, seasonality, trend, cycle, decomposition",
    "author": "Iskander Gaba",
    "author_email": "iskander@hey.com",
    "download_url": "https://files.pythonhosted.org/packages/94/77/9edc1388d841677e2bddb88f0914191f233e7d09e5fd9a2560661dfebd0a/pyriodicity-0.3.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\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 = Autoperiod(data)\n>>> autoperiod.fit()\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",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pyriodicity provides an intuitive and easy-to-use Python implementation for periodicity detection in univariate signals.",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://pyriodicity.readthedocs.io",
        "Repository": "https://github.com/iskandergaba/pyriodicity"
    },
    "split_keywords": [
        "signal",
        " time",
        " series",
        " forecast",
        " analysis",
        " period",
        " periodicity",
        " seasonality",
        " trend",
        " cycle",
        " decomposition"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c3df538d142803253381ddfe2a285e385e43782c5875370ed3f5f66dd343a00",
                "md5": "40f3355f86c116a0c17a8198c279af2b",
                "sha256": "b629345c05cffa092995d36ed43bb2a99cc84f6e0c30ed9a02c6464581ccaf9d"
            },
            "downloads": -1,
            "filename": "pyriodicity-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "40f3355f86c116a0c17a8198c279af2b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 15313,
            "upload_time": "2024-10-25T22:57:46",
            "upload_time_iso_8601": "2024-10-25T22:57:46.975750Z",
            "url": "https://files.pythonhosted.org/packages/5c/3d/f538d142803253381ddfe2a285e385e43782c5875370ed3f5f66dd343a00/pyriodicity-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94779edc1388d841677e2bddb88f0914191f233e7d09e5fd9a2560661dfebd0a",
                "md5": "bd0a1f52a39a27742e819b8eb044b782",
                "sha256": "b8601bd060ef8f0868de69c33dd32a3f7c120e860ed62c9b058268f297b58d5b"
            },
            "downloads": -1,
            "filename": "pyriodicity-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bd0a1f52a39a27742e819b8eb044b782",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 9597,
            "upload_time": "2024-10-25T22:57:48",
            "upload_time_iso_8601": "2024-10-25T22:57:48.151225Z",
            "url": "https://files.pythonhosted.org/packages/94/77/9edc1388d841677e2bddb88f0914191f233e7d09e5fd9a2560661dfebd0a/pyriodicity-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-25 22:57:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iskandergaba",
    "github_project": "pyriodicity",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pyriodicity"
}
        
Elapsed time: 2.15198s