Traditional machine learning · Planned
Anomaly detection for production system metrics
Unsupervised anomaly detection on service metrics such as latency, error rate, and traffic, with seasonality-aware baselines and alerts tuned to keep false alarms low.
Planned project. This page describes the goal, the approach, and how the system will be evaluated. Code, a live demo, and results will be published here once it is built.
At a glance
Solo project: data pipeline, detectors, alerting rules, and API
- Problem
- Catch real incidents in service metrics early, without paging engineers for normal daily and weekly traffic patterns.
- Planned approach
- Seasonality-aware statistical baselines compared with an Isolation Forest on engineered features, scored on labelled incident windows and exposed through an alerting API.
- Design decisions
- Baselines that model daily and weekly cycles first, because a fixed threshold pages every Monday morning.
- Alerts fire only when an anomaly persists across consecutive windows, trading a little detection delay for far fewer false pages.
- Evaluation plan
- Precision and recall on labelled incident windows, detection delay in minutes, and false alerts per week on normal traffic.
Goal
Detect unusual behaviour in service metrics, such as a latency spike, a rising error rate, or a sudden traffic drop, early enough to act, while keeping false alarms rare. An alerting system that pages too often gets ignored, so precision matters as much as recall.
Planned approach
- Data. Metrics exported from Prometheus or a public metrics dataset with labelled incidents, at one-minute resolution.
- Baselines. Rolling statistics that account for time of day and day of week, so normal cycles are not flagged.
- Model. An Isolation Forest on features such as rate of change, deviation from the seasonal baseline, and cross-metric ratios, compared with the statistical baseline.
- Alerting rules. Require an anomaly to persist across consecutive windows, and group related metrics into one alert.
- Serving. A FastAPI endpoint that scores recent windows and returns anomalies with the metrics that drove them.
Evaluation plan
- Precision and recall on labelled incident windows.
- Detection delay: minutes from incident start to first alert.
- False alerts per week on periods with no incidents, the number that decides whether engineers trust the system.
Definition of done
A public repository, a demo dashboard, a results table comparing the baseline with the model, and a write-up of the alerting trade-offs.