Open mfaghfoory opened 4 years ago
Hello,
I think it beacause you have set the parameter "pvalueHistoryLength" to 9 (36/4).
The algorithm therefore needs 9 months of data in order to be able to confirm that there is indeed an anomaly even if the p-value is 0. I performed my tests by placing the anomaly on the 7th month and the 8th month, and nothing was detected. It was only from the 9th month and more that the algorithm detected the anomaly.
Example for the anomaly on the 9th month :
===============Detect temporary changes in pattern===============
Alert Score P-Value
0 100,00 0,50
0 120,00 0,00 => This line is not detected as a spike (because before the 9th month)
0 130,00 0,08
0 128,00 0,28
0 135,00 0,18
0 156,00 0,01
0 140,00 0,31
0 150,00 0,19
1 850,00 0,00 => This line is detected as a spike
0 170,00 0,50
0 154,00 0,54
0 162,00 0,53
0 147,00 0,56
0 154,50 0,55
0 215,10 0,46
0 278,30 0,37
0 196,40 0,53
0 292,00 0,39
0 231,00 0,30
0 308,60 0,09
0 294,90 0,19
1 426,60 0,01
0 269,50 0,47
0 347,30 0,21
0 344,70 0,27
0 445,40 0,06
0 320,90 0,51
0 444,30 0,12
0 406,30 0,29
0 442,40 0,21
1 580,50 0,00
0 412,60 0,45
1 687,00 0,01
0 480,30 0,40
0 586,30 0,20
0 651,90 0,14
=============== End of process, hit any key to finish ===============
Good point, I will check that
I want to create a spike detector as you have demonstrated in its sample page. Here it is my code
I have attached the dataset and at line 6, the numSales value is "703.5" which is absolutely a spike but is not detected as a spike. This is my result: