RobustPeriod#

class pyriodicity.RobustPeriod#

RobustPeriod periodicity detector.

Find the periods in a given signal or series using RobustPeriod [1].

References

[1]

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

Examples

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 RobustPeriod to find the list of periods in the data.

>>> from pyriodicity import RobustPeriod
>>> RobustPeriod.detect(data)
array([12])

Methods

detect(data[, lamb, c, db_n, modwt_level, ...])

Find periods in the given series.