Skip to main content
Repo·github.com
anomaly-detectiontime-seriesoutlier-detectionmonitoringmachine-learningdeep-learningpython

Anomaly Detection

Learn to detect anomalies in time-series and tabular data using various statistical, machine learning, and deep learning techniques. Implement methods like Z-score, Isolation Forest, Autoencoders, and Transformers for real-world applications.

intermediate2-3 hours4 steps
The play
  1. Statistical Anomaly Detection: Z-Score
    Calculate Z-scores for each data point in a time series. Points with Z-scores exceeding a threshold are flagged as anomalies.
  2. Density-Based Anomaly Detection: DBSCAN
    Apply DBSCAN to identify outliers as noise points in a dataset. Tune the `eps` and `min_samples` parameters for optimal performance.
  3. Isolation Forest Anomaly Detection
    Use Isolation Forest to isolate anomalies based on their lower density. Adjust the `n_estimators` and `contamination` parameters.
  4. Autoencoder Anomaly Detection
    Build an autoencoder to reconstruct normal data. Anomalies are identified by high reconstruction errors. This example uses a simple autoencoder with one hidden layer.
Starter code
Start by implementing Z-score anomaly detection on a simple time series dataset. Then, explore more advanced techniques like Isolation Forest and Autoencoders.
Source
Anomaly Detection — Action Pack