All lessons in Machine Learning Engineering: Reliable Predictive Models

Anomaly Scores and Investigation Budgets

Choose reference populations and validate an anomaly ranking under scarce labels.

30 minutes · Free with an account · preview

What you will learn

  • Compute a robust anomaly score from a chosen reference population and explain how contamination of that population changes the score.
  • Evaluate an anomaly ranking under a fixed investigation budget using precision at k, recall at k, and comparison with a random baseline.
  • Decide which records belong in a reference population for a dispatch anomaly screen and state the assumption that decision encodes.

The carrier's late-delivery model predicts a probability for every parcel. Anomaly detection answers a different question: which dispatch records look unlike the ordinary ones, whether or not they end up late? A van loaded with 52 parcels when the route normally carries about 41, a weather index far above anything seen at that depot, a route code that has never appeared before. These records may be data errors, fraud, process failures, or genuinely new conditions. Nobody has labelled most of them, and the operations team can only investigate a handful per day. That combination, scarce labels plus a hard investigation budget, shapes everything in this lesson.

This lesson is optional and self-contained. You need only the idea of a median, a percentile, and the definition of precision and recall from classification: precision is the share of flagged items that are truly positive, recall is the share of true positives that were flagged.

Choose another lesson