Background
I'm working in Network Operations Center, we monitor computer systems and their performance. One of the key metrics to monitor is a number of visitors\customers currently connected to our servers. To make it visible we (Ops team) collect such metrics as time-series data and draw graphs. Graphite allows us to do it, it has a pretty rich API which I use to build alerting system to notify our team if sudden drops (mostly) and other changes occur. For now I've set a static threshold based on avg value but it doesn't work very well (there are a lot of false-positives) due to different load during the day and week (seasonality factor).
It looks something like this:
The actual data (an example for one metric, 15 min time range; the first number is a number of users, the second - time stamp ):
[{"target": "metric_name", "datapoints": [[175562.0, 1431803460], [176125.0, 1431803520], [176125.0, 1431803580], [175710.0, 1431803640], [175710.0, 1431803700], [175733.0, 1431803760], [175733.0, 1431803820], [175839.0, 1431803880], [175839.0, 1431803940], [175245.0, 1431804000], [175217.0, 1431804060], [175629.0, 1431804120], [175104.0, 1431804180], [175104.0, 1431804240], [175505.0, 1431804300]]}]
What I'm trying to accomplish
I've created a Python script which receives recent datapoints, compares them with historical average and alerts if there is a sudden change or drop. Due to seasonality "static" threshold doesn't work well and script generates false-positives alerts. I want to improve an alerting algorithm to be more precise and make it work without constant tuning the alerting threshold.
What advise I need and things I discovered
By googling I figured that I'm looking for machine learning algorithms for anomaly detection (unsupervised ones). Further investigation showed that there are tons of them and it's very difficult to understand which one is applicable in my case. Due to my limited math knowledge I can't read sophisticated scholar papers and I'm looking for something simple to a beginner in the field.
I like Python and familiar with R a bit, thus I'll be happy to see examples for these languages. Please recommend a good book or article which will help me to solve my problem. Thank you for your time and excuse me for such long description
Useful links
Similar questions:
- Time series and anomaly detection
- Time Series Anomaly Detection with Python
- Time series anomalies
- Algorithms for Time Series Anomaly Detection
- Application of wavelets to time-series-based anomaly detection algorithms
- Which algorithm should I use?
External resources:
auto.arima
function from R's excellentforecast
package (see jstatsoft.org/v27/i03/paper). You can tune the confidence levels by adjusting thelevel
parameter, e.g.data.model <- auto.arima(data.zoo, ic = c("bic")); data.prediction.warningLimits <- forecast(data.model, h=1, level=0.99)
. $\endgroup$