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
- Statistical Anomaly Detection: Z-ScoreCalculate Z-scores for each data point in a time series. Points with Z-scores exceeding a threshold are flagged as anomalies.
- Density-Based Anomaly Detection: DBSCANApply DBSCAN to identify outliers as noise points in a dataset. Tune the `eps` and `min_samples` parameters for optimal performance.
- Isolation Forest Anomaly DetectionUse Isolation Forest to isolate anomalies based on their lower density. Adjust the `n_estimators` and `contamination` parameters.
- Autoencoder Anomaly DetectionBuild 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