Machine Learning, FoundationsLesson 71 of 92

Module 7 · Learning without labels, and learning a representation

Anomaly detection, and the base rate that ruins it

In this lesson

  • 8 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 9 of 10 in this chapter

This chapter’s goalCluster a dataset and defend the number of clusters with more than an elbow plot, reduce dimensionality with PCA and state how much information the reduction discarded, explain what an embedding is as a geometric object, and build a working nearest-neighbour search over pretrained embeddings without a GPU.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmWatch1:55Not available
Full audiobookNot availableNot available
A million transactions a day, 100 fraudulent, 90% recall, 1% false positive rateAlertedNot alertedActually fraud90caught10missedActually normal9,999false alarms989,901left alonePrecision is 90 / 10,089 = 0.9 per cent: ten thousand alerts a day, 99 of every 100 wrong. Reaching 50per cent precision needs a false positive rate near 0.01 per cent, a hundred times better, or asmaller population to score, where the base rate is higher and the arithmetic changes.
Precision is 90 / 10,089 = 0.9 per cent: ten thousand alerts a day, 99 of every 100 wrong. Reaching 50 per cent precision needs a false positive rate near 0.01 per cent, a hundred times better, or a smaller population to score, where the base rate is higher and the arithmetic changes.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

A different problem shape

Classification learns the boundary between two classes you have examples of. Anomaly detection learns what normal looks like and flags departures, using mostly or entirely normal data.

That framing is right when the anomalies are too rare to learn from, too varied to have a consistent pattern, or when tomorrow’s anomaly will not resemble today’s. Equipment failures, novel intrusions, new fraud schemes: in each case the positive class is not one thing.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the How a Language Model Actually Works exam.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘Anomaly detection, and the base rate that ruins it’, in Machine Learning, Foundations. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/machine-learning-foundations/finding-what-does-not-belong (Accessed: 29 November 2026).