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.26k stars 4.51k forks source link

Prophet to detect anomaly. #595

Closed jeesim2 closed 6 years ago

jeesim2 commented 6 years ago

Hello.

Prophet seems really simple and strong at forecast as I tested for several days.

Now I wonder I can use prophet to anomaly detection.

Basic idea is... first, fit model with data from a year ago to several days ago. second, run model.forecase() for recent and near future days. third, when actual data collected, compare forecast to it. If actual data far from forcasted I will count it anomal.

Problem is I have no idea about third step. I just read some articles like this. https://www.google.co.kr/url?sa=t&source=web&rct=j&url=https://blog.statsbot.co/time-series-anomaly-detection-algorithms-1cef5519aef2&ved=2ahUKEwiXz4vGkoXcAhUIm5QKHY1kA7UQjjgwD3oECAQQAQ&usg=AOvVaw10vigSY6syGsS-h9KjM6E3

Is this considerable approach to do anomaly detection?

IronistM commented 6 years ago

This is something that I have used in the following context, get event counts from Google Analytics and compare it to the expected. If the difference ie higher than a threshold then mark it as a review point. You can check it out here googleAnalyticsProphetR.

The tricky part is not to get overfit and/or how to define the threshold for marking something for review.

jeesim2 commented 6 years ago

@IronistM googleAnalyticsProphetR can be a good example for me.

BTW, I see you use tweeter's AnomalyDetectionTs function. Did you have tried any other function to pick anomalies?

It will be good If there exists AnomalyDetectionTs alternative for python.

IronistM commented 6 years ago

You can check out nicolasmller's pyculiarity and Marcnuth's ports.

Diyago commented 5 years ago

@jeesim2 Take look at https://towardsdatascience.com/anomaly-detection-time-series-4c661f6f165f

abhimanyu3-zz commented 4 years ago

@Diyago How the algorithm will perform if we will give minute by minute data instead of day or monthly data as there is lots of noise in minute by minute data stamp