tslumen.profile.components module¶
Functions for decomposing the time series in trend/seasonality/residual.
-
tslumen.profile.components.
seasonal_split
(data: pandas.core.series.Series) → pandas.core.frame.DataFrame[source]¶ - Splits the data by season:
Quarterly - Years by Quarters
Monthly - Years by Months
Weekly - Years by Weeks
Daily - Year+Months by Days
Business daily - Week by Day of the Week
Hourly - Year+Month+Day by Hours
- Parameters
data (pd.Series) – Time series split.
- Returns
Seasonally split data.
- Return type
pd.DataFrame
-
tslumen.profile.components.
stl
(data: pandas.core.series.Series, period: Optional[int] = None, seasonal: int = 7, trend: Optional[int] = None, low_pass: Optional[int] = None, seasonal_deg: Optional[int] = 0, trend_deg: Optional[int] = 0, low_pass_deg: Optional[int] = 0, robust: bool = False, seasonal_jump: int = 1, trend_jump: int = 1, low_pass_jump: int = 1) → pandas.core.frame.DataFrame[source]¶ Season-Trend decomposition using LOESS.
- Returns
DataFrame with 3 columns: trend, seasonality and residual.
- Return type
pd.DataFrame
See also
statsmodels STL: https://www.statsmodels.org/stable/generated/statsmodels.tsa.seasonal.STL.html