It earns a place when
- Use it when positive labels are scarce, costly or delayed and the normal distribution can be described.
- You can evaluate it against a credible baseline.
- Its output fits the decision and data constraints.
Machine learning models · Phase 3 · Lesson 25
Distinguish rare observations in a dataset from future observations that differ from the training distribution.
Distinguish rare observations in a dataset from future observations that differ from the training distribution.
An anomaly detector learns what ordinary looks like, then assigns a degree of strangeness to a new case.
Methods include distance or density scores, Isolation Forest path lengths, one-class SVM boundaries and probabilistic tail probabilities.
A payment-monitoring system may learn ordinary behaviour from mostly legitimate transactions and flag a sudden device, location and amount combination for review.
When a result looks surprisingly good, inspect the split, target timing, error slices and data-generating process before celebrating.
Use this as a small experiment rather than a recipe to copy blindly. Change one thing, record the result and explain the change.
Answer from memory first. The buttons reveal feedback, but the durable step is explaining why.
1. What does an anomaly detector usually learn?
2. Why is an anomaly score not automatically a decision?
3. What happens if normal training data contains many positives?
scikit-learn User Guide. Use the source for the deeper treatment after you can explain the lesson's core idea without looking.