Change Point Detection with Seasonal Time Series

February 8, 2016 No Comments detection, math

change-point-seasonality

Previously, we looked at using Twitter Breakout (EDM) to detect Anomalies. As with the popular E-Divisive, EDM detects mean shift and changes in distribution. Both algorithms work with seasonal time series, but perform even better without seasonality.

Change Point Doesn’t Work (Well) with Seasonality

To demonstrate the “weakness” of change point, let’s generate some fake seasonal time series. Then we will try to detect anomalies using two different change point detection algorithms: EDM and E-Divisive.

fail-change-point-EDM fail-change-point-E-Divisive

As we can see, due to the seasonality of the time series, traditional change point detection doesn’t work very well.

Removing the Seasonality

To use change point detection effectively, we need to remove the seasonality from our time series. And to do that, we need to know the period of the seasonality. In this case, we know the seasonality to be 158 data points per day. If we don’t know, it’s possible to calculate the seasonality using a Fourier Transform. We also need to know if the time series is multiplicative or additive. In our example, I have an additive time series, but most of the time it is multiplicative. With this information, we can now decompose to remove the seasonality. Finally, we can run the change point detection again to get a successful result.

success-EDM success-E-Divisive

With the seasonality removed, breakout EDM and E-Divisive work a little bit better.

Monitor & detect anomalies with Anomaly.io

SIGN UP
help with term papers