13. Seasonality and Frequency
1 data point every hour daily seasonality frequency = 24
Review signal characteristics: daily seasonality, one data point per hour, no visible trend
14. Additive vs Multiplicative Time Series
International Airline
Passengers per Month
(multiplicative)
Austria Industrial
Production per Quarter
(additive)
Seasonality
magnitude
increases
with trend
Seasonality
effect
remains
constant
despite trend
15. ● Multiplicative Model
Seasonal Trend Decomposition
= * *
observed trend seasonal residual
● Additive Model
= + +
observed trend seasonal residual
trend - long term signal behavior
seasonal - identified repetitive behavior
residual - all the rest that doesn’t fit the trend or seasonal
22. median
median + 6 mad
median - 6 mad
Seasonal-Trend Decomposition
residual
Therefore anomalies can now be found with linear-based thresholds
23. median
median + 6 mad
median - 6 mad
Seasonal-Trend Decomposition
residual
Therefore anomalies can now be found with linear-based thresholds
24. Residual Extraction
Mapping the anomalies found in residual back to the original signal identifies all data points of interest
25. Residual Extraction
Pros:
● Works well with seasonal time series - global and local anomalies
● Few parameters to optimize (compared to other models)
● Algorithm implementation is simple given statistics libraries as available
Cons:
● Need to know how to adjust period parameter for each time series
● Need to know how to adjust anomaly factor so to avoid noisy results
● Works only for seasonal time series where residual is a normal distribution
26. References / Q&A
Notebook Demo - https://github.com/hcmarchezi/jupyter_notebooks/blob/master/residual_extraction_demo_1.ipynb
Anomaly Detection: A Tutorial - http://icdm2011.cs.ualberta.ca/downloads/ICDM2011_anomaly_detection_tutorial.pdf
Twitter Anomaly Detection - https://github.com/twitter/AnomalyDetection
Automatic Anomaly Detection in the Cloud Via Statistical Learning - https://arxiv.org/pdf/1704.07706.pdf
Generalized ESD for Outliers - https://www.itl.nist.gov/div898/handbook/eda/section3/eda35h3.htm
Real Time Anomaly Detection System for Time Series at Scale -
http://proceedings.mlr.press/v71/toledano18a/toledano18a.pdf
Time Series Dataset - https://datamarket.com/data/