SignalFx Developers Guide

double_ewma()

double_ewma applies double exponential smoothing to the stream during a specified time window or based on smoothing parameters. Double exponential smoothing addresses smoothing problems that occur when the raw data exhibits a trend.

The Wikipedia article that covers Exponential smoothing has an entire section devoted to Double exponential smoothing.

Syntax (two durations)

double_ewma(over=None, trend_over=None, forecast=0, damping=1.0)

Table 1. Parameter definitions
Parameter Type Description

over

Duration (number plus units indicator)

Duration over which the method should calculate the level term of the double exponentially weighted moving average of each time series

trend_over

Duration (number plus units indicator)

Duration over which to calculate the trend term of each double exponentially weighted moving average of each time series

forecast

Duration (number plus units indicator)

Optional, default = 0: Future duration to use as the forecast

damping

decimal between 0 and 1

Optional, default value = 1: Damping parameter.

Syntax (single duration)

double_ewma(over=None, forecast=0, damping=1.0)

Parameter

Type

Description

over

Duration (number plus units indicator)

Duration over which the method should calculate the level and trend terms of the double exponentially weighted moving average of each time series

forecast

Duration (number plus units indicator)

Optional, default = 0: Future duration to use as the forecast

damping

decimal between 0 and 1

Optional, default value = 1: Damping parameter.

Syntax (two smoothing parameters)

Table 2. Parameter definitions
Parameter Type Description

alpha

decimal between 0 and 1

Smoothing parameter of the level term

beta

decimal between 0 and 1

Smoothing parameter of the trend term. beta must be greater than or equal to alpha.

forecast

Duration (number plus units indicator)

Optional, default = 0: Future duration to use as the forecast

damping

decimal between 0 and 1

Optional, default value = 1: Damping parameter.

Syntax (single smoothing parameter)

.double_ewma(alpha, forecast=0, damping=1.0)
Table 3. Parameter definitions
Parameter Type Description

alpha

decimal between 0 and 1

Smoothing parameter of the level and trend terms

forecast

Duration (number plus units indicator)

Optional, default = 0: Future duration to use as the forecast

damping

decimal between 0 and 1

Optional, default value = 1: Damping parameter.

Returns a reference to the input stream object.

Notes

Double exponential smoothing applies to a moving window. The degree of smoothing is expressed in terms of either durations or smoothing parameters. You must use one of the four forms of the method, as specified in the previous sections:

  • level duration, separate trend duration (over, trend_over)

  • Duration for level and trend (over)

  • Level smoothing, trend smoothing (alpha, beta)

  • Level and trend smoothing based on one term (alpha)

Notice that one or two durations or smoothing parameters is a matter of convenience: .double_ewma(over='5m') is equivalent to .double_ewma(over='5m', trend_over='5m'), and .double_ewma(0.8) is equivalent to .double_ewma(0.8, 0.8).

If you provide a duration, SignalFlow may do the calculation on rolled-up data. Long durations in particular may affect the resolution that the calculation job uses.

If you provide a smoothing parameter, SignalFlow performs the calculation at the resolution of the input stream. In particular, a smoothing parameter doesn’t influence the job resolution. Smoothing parameters that are closer closer to zero provide more smoothing. The number of slots in the smoothing window is determined by the smoothing parameter (closer to zero means more slots).

This method can’t be used to aggregate time series.

Examples

1
2
3
4
A = data('jvm.cpu.load')
A.double_ewma(0.1).publish()
A.double_ewma(over='20m', trend_over='18m').publish()
A.double_ewma(0.1, 0.2, forecast='5m', damping=0.9).publish()

© Copyright 2019 SignalFx.

Third-party license information