Statistical methods
Z-score
IQR method
Modified Z-score (MAD)
Uses Median Absolute Deviation instead of standard deviation. Resistant to outliers in the reference data.ML methods
Isolation Forest
- High-dimensional data
- No need for labeled examples
- Mixed feature types
DBSCAN
- Spatial data
- Clusters of arbitrary shape
- Unknown number of anomalies
Local Outlier Factor (LOF)
Time series anomalies
- Rolling statistics — flag values outside rolling mean ± N×rolling std
- Seasonal decomposition — flag large residuals after removing trend and seasonality
- Prophet-style — detect changepoints and outliers in seasonal time series