master
md 68 lines 2.7 KB
Rendered Raw
1 # double exponential smoothing
2
3 Exponential smoothing is one of many window functions commonly applied to smooth data in signal
4 processing, acting as low-pass filters to remove high frequency noise.
5
6 Simple exponential smoothing does not do well when there is a trend in the data.
7 In such situations, several methods were devised under the name "double exponential smoothing"
8 or "second-order exponential smoothing.", which is the recursive application of an exponential
9 filter twice, thus being termed "double exponential smoothing".
10
11 In simple terms, this is like an average value, but more recent values are given more weight
12 and the trend of the values influences significantly the result.
13
14 > **IMPORTANT**
15 >
16 > It is common for `des` to provide "average" values that far beyond the minimum or the maximum
17 > values found in the time-series.
18 > `des` estimates these values because of it takes into account the trend.
19
20 This module implements the "Holt-Winters double exponential smoothing".
21
22 Netdata automatically adjusts the weight (`alpha`) and the trend (`beta`) based on the number
23 of values processed, using the formula:
24
25 ```
26 window = max(number of values, 15)
27 alpha = 2 / (window + 1)
28 beta = 2 / (window + 1)
29 ```
30
31 You can change the fixed value `15` by setting in `netdata.conf`:
32
33 ```
34 [web]
35 des max window = 15
36 ```
37
38 ## how to use
39
40 Use it in alerts like this:
41
42 ```
43 alarm: my_alert
44 on: my_chart
45 lookup: des -1m unaligned of my_dimension
46 warn: $this > 1000
47 ```
48
49 `des` does not change the units. For example, if the chart units is `requests/sec`, the result
50 will be again expressed in the same units.
51
52 It can also be used in APIs and badges as `&group=des` in the URL.
53
54 ## Examples
55
56 Examining last 1 minute `successful` web server responses:
57
58 - ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.response_statuses&options=unaligned&dimensions=success&group=min&after=-60&label=min)
59 - ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.response_statuses&options=unaligned&dimensions=success&group=average&after=-60&label=average&value_color=yellow)
60 - ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.response_statuses&options=unaligned&dimensions=success&group=ses&after=-60&label=single+exponential+smoothing&value_color=yellow)
61 - ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.response_statuses&options=unaligned&dimensions=success&group=des&after=-60&label=double+exponential+smoothing&value_color=orange)
62 - ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.response_statuses&options=unaligned&dimensions=success&group=max&after=-60&label=max)
63
64 ## References
65
66 - <https://en.wikipedia.org/wiki/Exponential_smoothing>.
67
68