Skip to content

Commit

Permalink
Tweak dosctrings
Browse files Browse the repository at this point in the history
  • Loading branch information
iskandergaba committed Oct 25, 2024
1 parent d267e05 commit 2b7edcb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions pyriodicity/detectors/acf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class ACFPeriodicityDetector:
Examples
--------
Start by loading a timeseries datasets and resampling to an appropriate
frequency.
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
Expand Down
4 changes: 2 additions & 2 deletions pyriodicity/detectors/autoperiod.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Autoperiod:
Examples
--------
Start by loading a timeseries datasets and resampling to an appropriate
frequency.
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
Expand Down
12 changes: 6 additions & 6 deletions pyriodicity/detectors/cfd_autoperiod.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CFDAutoperiod:
"""
CFD-Autoperiod periodicity detector.
Find the periods in a given signal or series using CFDAutoperiod [1]_.
Find the periods in a given signal or series using CFD-Autoperiod [1]_.
Parameters
----------
Expand All @@ -33,8 +33,8 @@ class CFDAutoperiod:
Examples
--------
Start by loading a timeseries datasets and resampling to an appropriate
frequency.
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
Expand All @@ -59,9 +59,9 @@ class CFDAutoperiod:
>>> cfd_autoperiod.fit(k=300)
array([12])
``CFDAutoperiod`` is considered a more robust variant of ``Autoperiod``.
The detection algorithm found exactly one periodicity of 12, suggesting
a strong yearly periodicity.
``CFDAutoperiod`` is considered a more robust variant of ``Autoperiod``
against noise. The detection algorithm found exactly one periodicity
length of 12, suggesting a strong yearly periodicity.
"""

def __init__(self, endog: ArrayLike):
Expand Down
8 changes: 4 additions & 4 deletions pyriodicity/detectors/fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ class FFTPeriodicityDetector:
40, 28, 20, 3, 5, 15, 29, 22, 2, 24, 53, 33, 26,
16, 17, 21])
``FFTPeriodicityDetector`` tends to be quite sensitive to noise and find
many false period lengths. Depending on your data, you can choose to
apply a window function to get different results. You can also limit the
number returned period length values to the 3 most signficant ones.
``FFTPeriodicityDetector`` tends to be quite sensitive to noise and can find
many false period lengths. Depending on your data, you can choose to apply
a window function to get different results. You can also limit the number
returned period length values to the 3 most signficant ones.
>>> fft_detector.fit(window_func="blackman", max_period_count=3)
array([12, 13, 11])
Expand Down

0 comments on commit 2b7edcb

Please sign in to comment.