01
Unusual, given the drivers
Bayesian anomaly detection on demand signals
- I built a service that asks of demand what I first asked of train telemetry: is this point out of line with what I expected? A rolling Normal-Inverse-Gamma regression on promotion, price, seasonality and weather gives a Student-t posterior predictive at each step. A two-sided posterior predictive p-value flags the tail.
- The expectation moves with the drivers. A promotion week expects more demand, so only the part the promotion does not explain gets flagged. The service runs as a FastAPI container on GCP Cloud Run, and I tagged it v1 on 8 September 2025 with the method written up on Confluence.
Basis Build and deployment facts from my journal, August to October 2025, tested on generated demand signals. I marked the detection evaluation done on 15 October 2025 without recording a figure, so no detection rate is quoted.
deployed as a serviceon GCP Cloud Run, in Avathon's demand planning platform
Python, Normal-Inverse-Gamma updating, scikit-learn BayesianRidge, PyMC, FastAPI, Docker, GCP Cloud Run







