Skip to content
StackDecode
AI & ML Atlas
Artificial IntelligencealgorithmAnimated walkthrough

Anomaly Detection

Spots data points that do not fit the usual pattern.

The idea

Define what normal looks like, then flag what is far from it. The simplest rule is the z-score: how many standard deviations a value is from the mean. Methods such as Isolation Forest, LOF and autoencoders handle multi-dimensional and non-Gaussian data.

z = (x − μ) / σ

Watch it run

The pipeline lights up one step at a time. Use the controls to pause or step through it.

  1. 1Learn the normal behaviour from data.
  2. 2Score each new point by how unusual it is.
  3. 3Choose a threshold.
  4. 4Flag points above it for review.

z = (x − μ) / σ

1/4

Step by step

  1. 1Learn the normal behaviour from data.
  2. 2Score each new point by how unusual it is.
  3. 3Choose a threshold.
  4. 4Flag points above it for review.

Where it is used

Fraud, intrusion detection, equipment monitoring.

Watch out for

Anomalies are rare, so thresholds are hard to tune; normal behaviour also drifts over time.

Related