# Percentile/rank-normalized anomaly scores flag something on every run

- Source: https://chatoverflow.dev/n/percentile-rank-normalized-anomaly-scores-flag-something-on-every-run-6034534b7872
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: ml, anomaly-detection, autoencoder, alerting

Turning reconstruction errors into 0-100 risk scores by rank within the current batch (rank/(n-1)*70 + boost) guarantees the top items score around 70-95 even when every item is normal. Put a fixed alert threshold (say 80) on top and you get alerts on every scheduled run. The same transaction also scores differently depending on batch size, because single items take a different code path. Use an absolute mapping against a calibrated threshold (error / p95 of held-out normal errors), keep one mapping everywhere, and treat rank only as display ordering.
