KPI Sentinel — anomaly detection with a why
A dashboard that says why the numbers moved
- ROLE
- Solo build
- TIMEFRAME
- 2025
- STACK
- Python, pandas, STL, Streamlit
- LINKS
- github ↗
the why
NOT JUST ALERTS
The problem
Ops dashboards are good at saying "something's wrong" and terrible at saying where. An anomaly alert without attribution is homework: someone still has to dig through state, store, and department cuts by hand.
Approach
KPI Sentinel computes six retail KPIs daily (units, revenue, average price, price index, zero-sales rate, demand volatility) across the full M5 hierarchy — global, state, store, category, department, down to ~30,000 items. Anomalies are flagged against seasonality-aware baselines (STL decomposition with weekly seasonality, scored with robust MAD), then a hierarchical contribution analysis walks the tree from global to department to attribute the move. A Streamlit dashboard exposes the overview and a root-cause explorer, and incident reports are generated automatically.
Results
[Add detection quality on injected anomalies — precision/recall — and an example incident the RCA pinned correctly.]
What broke
[STL behaviour around event days? SNAP-day false positives? What MAD thresholds took tuning?]