seasonal-esd-anomaly-detection icon indicating copy to clipboard operation
seasonal-esd-anomaly-detection copied to clipboard

Use decomposition.resid instead of manually calculate residual

Open clumdee opened this issue 3 years ago • 0 comments

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

clumdee avatar Oct 19 '21 10:10 clumdee