facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.01k stars 4.48k forks source link

Outliers detection #229

Open ProdigiosaLadybug opened 7 years ago

ProdigiosaLadybug commented 7 years ago

Hello,

and thank you for sharing the Prophet model.

I am wondering if all types of outliers (i.e AO, IO, TC, LS) can be set to NA in order to run the Prophet model.

I want to detect outliers previous to execute the prophet model, and I'm not sure about what is the best practice. Could you help me please? Is it a good option to detect the outliers from the random component? random= yhat - (seasonal + weekly + yearly + holidays + trend)

Thank you in advance,

bletham commented 7 years ago

Automatically detecting outliers can be hard in this setting. A holiday / repeating event that was left out of the model could be detected as an outlier; ideally you'd want to fix the model, not throw out the data. That said, what you describe (|y - yhat|) seems to me to be the best signal for finding outliers.

MartSlaaf commented 6 years ago

For me little hack for detecting strong outliers was iteratively refitting model and dropping values lying out of confidence interval (yhat_lower, yhatupper). There are some problems with stopping criterion in such approach. I think that changes between models prediction after drop-refit cycle like MSE(yhat(i), yhat_(i-1)), can be a good solution, but it can have some issues.