# Anomaly score calculation for multidimensional data set

I'm currently using anomaly score calculation methods which work on single dimensional data sets (Timestamp & Value). I would like to calculate the same single anomaly score for multidimensional data set (Timestamp & Value 1 & Value 2 & ..... & Value N).

What method could compare all the values and calculate anomaly score based upon the relationship between them?

## 3 Answers

One very simple yet efficient way, is auto-regression, which means, you train a regressor on past data, and predict the future, if the prediction is off by too much - then you call it an anomaly.

to make it more formal, if we denote $\vec{v}_{t0}$ as your data at timestamp $t_0$, we train a regression model $R$ that learns from $\{v_{t_0},\dots,v_{t_{n-1}}\}$.

Your anomaly score is a function of $R({v_{t_0},\dots,v_{t_{n-1}}})-v_{t_n}$

I think you can use a prediction model to predict next value $y_{pred}$ after that you have:

$e = |y_{pred} - y_t|$, use error to compare with "$alpha \times std$" of series. $alpha = [1, 10]$.

Assuming that your anomaly score is based on the Gaussian probability distribution, there's no reason why you could not extend it to be multivariate.