Triple exponential chart
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
Go to Data Search and open the required table.
Perform the required operations to get the data you want to use in the chart.
After getting the required query results, click the gear icon on the toolbar and select Charts → Anomaly Detection → Triple Exponential.
Drag the required columns to their corresponding fields. This chart requires you to select the following fields:
Value Add the numeric column whose values you want to analyze. float, integer or duration
The triple exponential chart is displayed.
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.
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:
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.
It is really important to specify the period length properly
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.
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.
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.
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:
There are events that don't exist
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.
It is advisable to keep the lowest possible rate of points to be interpolated in order to get the most out of the chart. Keep in mind that interpolated points are simply a prediction generated by the chart, and are not real.
This problem may be solved by regrouping your query using a greater grouping period.
The data is not fully downloaded
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.