LeeDoYup / RobustSTL

Unofficial Implementation of RobustSTL: A Robust Seasonal-Trend Decomposition Algorithm for Long Time Series (AAAI 2019)
MIT License
271 stars 53 forks source link

Trend seems to depend on the first value of sample #6

Closed junhyk closed 5 years ago

junhyk commented 5 years ago

Hi, I've tried to test your great code with other samples. And I found the trend is always highly dependent on the first value of the samples image Note that since my sample is non-seasonal I manually set seasons_tilda as zeros Do you have any idea?

Thanks

LeeDoYup commented 5 years ago

I think it has a local optimal problem in solving trend extraction. Have you tried normalization (to set the mean value of series as "0") ?

LeeDoYup commented 5 years ago

and it is true that RobustSTL can highly depends on the first value. (because it sequentially sovle the convex optimization problem.)

junhyk commented 5 years ago

I guess normalization works a bit. image Thanks for your insight :)

LeeDoYup commented 5 years ago

Thank you for using my codes. For you information (in my experience), RobustSTL algorithm suffer when abnormal patterns are many or repeated in same season (in here, when abnormal patterns occurs consecutively).

LeeDoYup commented 5 years ago

In addition, i think your data contain lots of peak values and no seasonality. Then, just smoothing + 3 sigma can be effective way to detect outliers.