12.03.2016 Views

Anomaly Detection for Monitoring

anomaly-detection-monitoring

anomaly-detection-monitoring

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pletely out of phase with the seasonal pattern. This is easy to see in<br />

Figure 4-3.<br />

Figure 4-3. A sine wave and a EWMA of the sine wave, showing how a<br />

EWMA’s lag causes it to predict the wrong thing most of the time.<br />

Coping with seasonality is exactly the same as with trend: you need<br />

to decompose and subtract. This time, however, it’s harder to do<br />

because the model of the seasonal component is much more complicated.<br />

Furthermore, there can be multiple seasonal components in a<br />

metric! For example, you can have a seasonal trend with a daily<br />

period as well as a weekly period.<br />

Multiple Exponential Smoothing<br />

Multiple exponential smoothing was introduced to resolve problems<br />

with using a EWMA on metrics with trend and/or seasonality. It<br />

offers an alternative approach: instead of modifying a metric to fit a<br />

model by decomposing it, it updates the model to fit the metric’s<br />

local behavior. Holt-Winters (also known as the Holt-Winters triple<br />

exponential smoothing method) is the best known implementation<br />

of this, and it’s what we’re going to focus on.<br />

A multiple exponential smoothing model typically has up to three<br />

components: an EWMA, a trend component, and a seasonal component.<br />

The trend and seasonal components are EWMAs too. For<br />

example, the trend component is simply an EWMA of the differences<br />

between consecutive points. This is the same approach we<br />

36 | Chapter 4: Dealing with Trends and Seasonality

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!