STLDecomposition Implementation
See original GitHub issueHello, First of all thank you for open sourcing the package; it is excellently written.
One potential issue I’ve noticed: the STL Decomposition seems to be implemented using a rolling window method for detrending data, not the Loess method. Here is a code snippet from transformer_1d.py:
def _remove_trend(self, s):
s_trend = s.rolling(
window=(self.freq_ if self.freq_ % 2 else self.freq_ + 1),
center=True,
).mean()
return s - s_trend
Perhaps I’m missing something? The current implementation seems to be what Hyndman calls Classical Decomposition, and not STL. There is a python library that does STL decompose and it is relatively lightweight. And if what I’m describing is indeed the behavior, can I work on implementing STL with Loess?
Any feedback would be greatly appreciated, Thank you
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
STL decomposition : How to do it from Scratch?
This is a statistical method of decomposing a Time Series data into 3 components containing seasonality, trend and residual. Now, what is a...
Read more >Seasonal-Trend decomposition using LOESS (STL)
This note book illustrates the use of STL to decompose a time series into three components: trend, season(al) and residual. STL uses LOESS...
Read more >6.6 STL decomposition | Forecasting: Principles and Practice ...
STL is a versatile and robust method for decomposing time series. STL is an acronym for “Seasonal and Trend decomposition using Loess”, while...
Read more >Seasonal Decomposition of Time Series by Loess - GitHub
The Seasonal-Trend-Loess (STL) algorithm decomposes a time series into seasonal, trend and residual components. The algorithm uses Loess interpolation (original ...
Read more >STL Algorithm Explained: STL Part II - Dillon R. Gardner
STL (Seasonal Trend decomposition using Loess) was developed by Cleveland et al. Journal of Official Statistics 6 No. 1 pp 3-33 1990. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yy910616 i just noticed that statsmodels v0.11 has been released.
@yy910616 I think you are right. I appreciate that you raised the problem. I’m gonna work on this and hopefully have it in the next release. Will keep you updated when a PR is ready to be reviewed.