Anomaly detection algorithms look at an unlabeled data set and determine unusual or abnormal data points or events. Common use cases include applications where unusual activity is a problem, such as fraud detection, quality analysis in manufacturing, and monitoring computers in data centers.

Density Estimation

The most common way to carry out anomaly detection is with an algorithm called density estimation. Given a dataset $\{x^1, x^2, \dots, x^m \}$ , the density estimation algorithm computes a model $p(x)$, which is the probability of $x$ being seen in the dataset.

If this were to be graphed, boundaries form around the data, corresponding to various probabilities. As the data move closer to the “center” of the data, it has a higher probability. Likewise, as it moves further away, its probability decreases.

Untitled

In order to detect an anomaly, a cutoff point must be set, which is represented by $\epsilon$. This is usually a smaller number, depending on the application. New data is fed into the model and compared to this value. Then an anomaly (or not) is applied to the new training examples. This relationship is represented as,

$$ \text{anomaly} = p(x_{test}) < \epsilon $$

Gaussian (Normal) Distribution

Defining the Algorithm

Evaluating the Model’s Performance

Comparing to Supervised Learning

Fine Tuning Features