Strategy to convert a collective anomaly to a point anomaly problem
A collective anomaly can be converted to a point anomaly problem and then solved using the techniques mentioned above. Each contextual anomaly can be represented as a point anomaly in N dimension where N is the size of the sliding window. Let's say that we have the following numbers: 1;45;1;3;54;1;45;24;5;23;5;5
. Then a sliding window of size 4 will produce the following series of collections can be generated by the following code
This produces the following lists:
val data : int list = [1; 45; 1; 3; 54; 1; 45; 24; 5; 23; 5; 5] val windowSize : int = 3 val indices : int list list = [[1; 45; 1]; [45; 1; 3]; [1; 3; 54]; [3; 54; 1]; [54; 1; 45]; [1; 45; 24];[45; 24; 5]; [24; 5; 23]; [5; 23; 5]; [23; 5; 5]]
Now, as you have seen before, all of these lists can be represented as one point in three dimensions and Grubb's test for multivariate data.