OnlineFFTPeriodicityDetector#
- class pyriodicity.OnlineFFTPeriodicityDetector(window_size, buffer_size=None, window_func='boxcar', detrend_func='linear')#
Online Fast Fourier Transform (FFT) based periodicity detector.
Detect periodicities in a signal stream data using Sliding Discrete Fourier Transform (DFT) algorithm [1].
- Parameters:
- window_sizeint
Size of the sliding window for the ACF computation.
- buffer_sizeint, optional, default = 2 * window_size
Size of the samples buffer. Must be at least equal to window_size.
- window_funcfloat, str, tuple, optional, default = ‘boxcar’
Window function to apply. See
scipy.signal.get_windowfor accepted formats of thewindowparameter.- detrend_func{‘constant’, ‘linear’}, optional, default = ‘linear’
The kind of detrending to apply. If None, no detrending is applied.
See also
pyriodicity.FFTPeriodicityDetectorFast Fourier Transform (FFT) based periodicity detector.
References
[1]Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts: Melbourne, Australia. https://OTexts.com/fpp3/useful-predictors.html#fourier-series. Accessed on 09-15-2024.
Methods
detect(data[, max_period_count])Update the frequency spectrum and detect periodicities.