Skip to content

Commit

Permalink
Add notes section to explain some details
Browse files Browse the repository at this point in the history
  • Loading branch information
d.a.bunin committed Nov 26, 2021
1 parent 853bb92 commit ee94bb1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions etna/transforms/fourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ def __init__(
if order is < 1 or > ceil(period/2)
ValueError:
if at least one mod is < 1 or >= period
Notes
-----
To understand how transform works we recommend: https://otexts.com/fpp2/useful-predictors.html#fourier-series
* Parameter `period` is responsible for the seasonality we want to capture.
* Parameters `order` and `mods` define which harmonics will be used.
Parameter `order` is a more user-friendly version of `mods`.
For example, `order=2` can be represented as `mods=[1, 2, 3, 4]` if `period` > 4 and
as `mods=[1, 2, 3]` if 3 <= `period` <= 4.
"""
if period < 2:
raise ValueError("Period should be at least 2")
Expand Down

0 comments on commit ee94bb1

Please sign in to comment.