arundo / adtk

A Python toolkit for rule-based/unsupervised anomaly detection in time series
https://adtk.readthedocs.io
Mozilla Public License 2.0
1.06k stars 143 forks source link

Identify no change in time series #140

Open guidocioni opened 1 year ago

guidocioni commented 1 year ago

Sometimes an anomaly could lie in the fact that the timeseries value is not changing at all, that is the previous value is exactly the same as the next one.

Is it possible to adapt the PersistAD detector to identify these points as anomalies?

I was looking into the underlying Pipenet implementation but unfortunately it seems that the only way to identify the anomaly is to find something exceeding a certain threshold and not just staying the same.

danendral commented 1 year ago

Have you tried using VolatilityShiftAD?

It compares the volatility (e.g. standard deviation) between two rolling windows. You can also set if you want to detect positive or negative value change in the selected aggregation method.

In your case, you may set side = "negative" as you want to see the huge drop in volatility (right window volatility will be zero when there are constant values)