seasonal-esd-anomaly-detection
seasonal-esd-anomaly-detection copied to clipboard
Use decomposition.resid instead of manually calculate residual
Hi,
Thanks for this library. Not sure how to properly ask a question. My apologies if I inappropriately raise an issue.
I see that you get residual by subtracting seasonality and median from the original array. Since STL() already provide all information after fitting. Why not just use decomposition.resid which comes directly from there? I also think it will be more accurate.
https://github.com/nachonavarro/seasonal-esd-anomaly-detection/blob/8a9fabd5d598ab061d343c89a2a4b59392df0471/sesd.py#L81