AnomalyDetection icon indicating copy to clipboard operation
AnomalyDetection copied to clipboard

This ESD test implementation differs from the Twitter's R implementation and the definition of the test

Open pkwan9 opened this issue 7 years ago • 1 comments

By definition of the test and Twitter's R implementation, all the candidates that have been considered until the largest i such that max_R_i > lambda_i are all anomalies, not just the ones that are in the iterations that have max_R_i > lambda_i.

There have been simulation studies showing that the inequality of max_R_i > lambda_i can swing back and froth as the iteration is progressed. This python implementation of ESD test may miss some anomalies.

pkwan9 avatar Dec 03 '18 21:12 pkwan9

I, too, have experienced discrepancies between the output of R and Python. There seems to be only a few lines that I changed in order for R and Python to output the same things (at least, on the time series I'm feeding into the two implementations...). I'll be submitting a pull request soon with these minor changes!

mikeyling18 avatar Oct 03 '19 21:10 mikeyling18