Document toolboxDocument toolbox

Triple exponential chart

Overview

The triple exponential smoothing method (also known as Holt-Winters algorithm) performs exponential smoothing on the three main components of a series: level, trend and seasonality. The inside of the algorithm is similar to a classic moving average that exponentially decreases its weights over time. The seasonality assumption has a great impact on the result and the smoothing factors on the three components are optimized via the Nelder-Mead method.

When should I use this chart?

The algorithm used in this chart is very sensitive to changes in the data seasonality and for this reason, it works optimally when the series presents a clear and constant periodicity.

What data do I need for this chart?

Firstly, it is important to note that this chart is meant to be used with time series, that is to say, numerical univariate data flows that must have a constant time step and an associated timestamp.

The option to create this chart will be disabled unless your query contains a temporal grouping with no columns added as arguments. Furthermore, your query must contain a numeric column (for example, you can aggregate your data and add a count).

For example, this is a correct query that would enable the Triple Exponential chart option in the search window:

from demo.ecommerce.data group every 1h select count() as count

Creating a triple exponential chart

Working with triple exponential charts

The data analysis performed by this chart can be divided into two phases: training and evaluation.

The total points that will be used to train your model is the result of multiplying the period length of the selected series (dark green band) by the specified number of periods (light green band), as you can graphically see on the chart. You can also specify these settings using the options at the top of the chart, as explained below.

Everything that is not part of the training will be evaluated by the algorithm. After training part of the data in a specified series, the chart will predict potential anomalies and will indicate them as red points.

Anomalous points

It is advisable, as far as possible, to avoid including visible anomalous points in the training set.

After selecting the required period, click the Train button to get the results.

You can configure the following options at the top of the chart window:

Period length

Number of points of the selected period. This can also be selected by dragging the dark green band in the chart. Note that the starting point of the period cannot be edited in the chart; to modify it, you must change the starting time of the query. The default value is 12.

Period accuracy

It is really important to specify the period length properly 

Seasonal

Type of seasonality. It can either be additive or multiplicative. Null/zero values are not allowed with a multiplicative seasonality. The default option is additive. You can learn more about seasonality here.

Training periods

Number of periods used to train. The minimum and the default value is 3. It can also be edited by dragging the light green band in the chart.

Number of points

Note that the number of points used to train the model corresponds to the result of multiplying the values entered in the Period length and Training periods fields.

Threshold

The threshold is a constant value that you can add to the algorithm confidence interval in order to be more or less strict with the anomalies found. Increasing the threshold sets a higher confidence interval, which will make the chart detect only very clear anomalies. This will produce false negatives, in other words, anomalies that are not that obvious will not be detected. By contrast, if the threshold is set to a low value or 0, even those anomalies that are not really clear will be detected. Keep in mind that this will cause the appearance of many false positives (more anomalies than the actual ones will be detected).

The threshold is represented by the light blue band. After training the model, you can update the threshold by clicking the Update threshold button next to this option. The default value is 0.

You can zoom in to specific parts of the series by clicking a point in the top chart and dragging to the required ending point. You can also use the sliders in the bottom chart to specify the required part of the series. To go back to the default zoom, return the sliders to the beginning and end of the bottom chart or click the All button in the Zoom area.

Handling missing points

The triple exponential chart needs a regular and uninterrupted flow of data points in order to work properly, so missing values need special handling to make the chart work. There are two possible causes for missing points:

You will not be able to train your model if the data series contains holes due to non-existing events. In this case, the chart would try to interpolate those missing points. The interpolation takes into account the average of n previous points to allow working in real-time. When interpolation occurs, gaps are filled with purple dots to indicate that you are visualizing generated values. 

The maximum number of consecutive missing points to be interpolated is 5. If this value is exceeded, you will not be able to train the model. An error will appear when clicking the Train button and holes will be marked in the chart with pinkish bands.

Interpolation only works with events that don't exist. The chart will never interpolate values from data yet to be loaded. These areas are represented on the chart as gray bands. In this case, the chart will only evaluate up to the first gap.

There must be enough events for at least training and evaluating one point before the gap starts, otherwise, you will be notified. Click the Download more button in the warning message that appears to download the data required for the widget to train, or do it manually activating the Load all events option in the Event loading indicator of the search window.

If you wish to fill certain areas where gaps are located, you can do so by clicking on the event timeline at the top of the search window. Learn more about loading data in the search window here.