Detect unusual records with anomaly detection
8 steps · about 2 h 19 min · Intermediate
- Separate outlier and novelty detection (article, scikit-learn documentation, 18 min)
Choose a problem formulation before comparing detector scores.
- Start with a transparent univariate rule (article, NIST/SEMATECH e-Handbook, 15 min)
Use a robust exploratory test while recognising masking and distribution assumptions.
- Model an elliptical inlier region (reference, scikit-learn documentation, 15 min)
Learn when a covariance-based boundary is useful and when its shape assumption is unsafe.
- Fit an Isolation Forest (reference, scikit-learn documentation, 20 min)
Use random partitions to score unusual multivariate observations without a density model.
- Find local density anomalies (reference, scikit-learn documentation, 18 min)
Detect points that are unusual relative to nearby observations rather than the entire dataset.
- Compare detector boundaries (article, scikit-learn documentation, 20 min)
Visualise how algorithm assumptions behave on several data shapes and noise levels.
- Inspect Isolation Forest decisions (article, scikit-learn documentation, 15 min)
Connect anomaly scores and a chosen threshold to the points that get flagged.
- Evaluate rare labelled anomalies (reference, scikit-learn documentation, 18 min)
Use precision-recall evidence and review cost instead of accuracy on a rare-event task.