Pyriodicity provides an intuitive and easy-to-use Python implementation for periodicity detection in univariate signals.
Project description
About Pyriodicity
Pyriodicity provides an intuitive and easy-to-use Python implementation for periodicity detection in univariate signals. Pyriodicity supports the following detection methods:
Installation
To install pyriodicity, simply run:
pip install pyriodicity
To install the latest development version, you can run:
pip install git+https://github.com/iskandergaba/pyriodicity.git
Usage
Please refer to the package documentation for more information.
For this example, start by loading Mauna Loa Weekly Atmospheric CO2 Data from statsmodels and downsampling its data to a monthly frequency.
>>> 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).
>>> 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 for more details.
References
- [1] Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts: Melbourne, Australia. 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.
- [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.
- [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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyriodicity-0.4.1.tar.gz.
File metadata
- Download URL: pyriodicity-0.4.1.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2764d91dfb2520012bc2abb9550d686b7f5b1841e1b11e679ec9aa1285395db8
|
|
| MD5 |
6962a9bf3ab4bac8ce19c9e747734e1e
|
|
| BLAKE2b-256 |
a634a79ac3aba7427114b2a5183b5d0410e37230de31c6429a917dfc971a5fab
|
File details
Details for the file pyriodicity-0.4.1-py3-none-any.whl.
File metadata
- Download URL: pyriodicity-0.4.1-py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f200b6d2885cc5639f8e830784b037e7fd7092ec4e3b3d11e0c2d249d9e3e17e
|
|
| MD5 |
2fe7a52848c0541ae3749a927e8b4391
|
|
| BLAKE2b-256 |
f69c0055910805b5fa2c669f2ccbacb501359210d26d1c6be19255d5e45125ed
|