A comprehensive guide to building a time series anomaly detection toolkit in Python that identifies four types of anomalies: trend anomalies using linear and polynomial regression, volatility anomalies by comparing variance across datasets, single-point anomalies using rolling window Z-scores, and dataset-level anomalies by comparing signal magnitudes. The implementation uses statistical methods rather than deep learning, providing explainable results through a modular codebase with data generation, detection functions, and visualization capabilities. All code is available on GitHub with a configurable JSON-based dataset generator.
Table of contents
0. The dataset1. Trend Anomaly Identification2. Volatility Anomaly Identification3. Single-point Anomaly4. Dataset-level Anomaly5. All together!6. Conclusions7. Before you head out!Sort: