Example TIM in Qlik

This section shows an example of the TIM integration in Qlik Sense.

Forecasting

The forecasting part of the example is based on a bicycle sharing dataset from Kaggle. If you want to follow along to the example, you can download the relevant QVF file here.

The image below gives an overview of what the dataset looks like. In the bottom left corner the raw input data is shown in a table. It consists of a timestamp column, a target variable (the number of riders) and several additional predictors. In the upper half of the image, the target variable is shown over time. In the bottom right, some of the additional predictors are visualized in more detail, namely the temperature, the humidity and whether or not the timestamp corresponds to a holiday.

image.png

If you zoom into a part of the target variable, you can clearly distinguish a daily and weekly pattern (also called seasonality), as shown in the image below.

image.png

In the image below, you can see the dashboard in which the forecasting functionalities will be visualized. Currently, no forecast model has been built, as indicated by the deselected "Activate model" button on the bottom. The line chart at the top again shows the target variable, namely the number of riders.

image.png

Clicking this "Activate model" button will send a request to the TIM engine, asking it to build a forecasting model, apply it, and return the results.

image.png

Once a model has been built and applied, you can see a forecast made by TIM (red line) next to the historical actuals (blue line) in the line chart at the top. In the bottom left corner, a set of buttons allow you to choose which predictors to use in the model. Input boxes allow you to set the forecast start date and duration.

image.png

Upon changing the predictor toggle buttons or forecast parameters, Qlik will send the data and configuration over to the TIM engine, which will in turn build a model and return the requested forecast. If you want to change multiple aspects of the configuration at once, you can do so by deactivating the model before making the desired changes, and then activating it again.

Qlik's filtering functionality can be used to select which subset of the dataset should be send to TIM for model building purposes. Only the data in the filtered time period will get sent to TIM.

image.png

In some cases, you may wish to zoom in and view the results of a forecast without triggering a new forecast. This can be achieved by using the mini chart zooming functionality below the line chart.

image.png

Next to these configurations, you can find a table showing the predictor importances. For each of the predictors that contributed to the forecast is shown to what extent they contributed, and thus how important they are in the model. In the bottom right, you can see a table showing the feature importances. It gives you a more detailed look into the model, by showing the features (transformations and interactions of predictors) that contribute to the forecast, their type, and to what extent they contributed.

Anomaly detection

The anomaly detection part of the example is based on a wind turbine dataset. The goal is to detect anomalies on a specific component of a wind turbine, namely the gearbox. This is done by using the temperature of the gearbox as KPI. If you want to follow along to the example, you can download the relevant QVF file here.

The image below gives an overview of the dashboard in which the anomaly detection functionalities will be visualized. Currently, no anomaly detection model has been built, as indicated by the deselected "Activate model" button on the left. The line chart at the top shows the target variable, namely the temperature of the gearbox.

image.png

The line chart called "Predictors" gives an overview of the additional predictors in the dataset, namely the ambient temperature (blue), the rotor speed (yellow) and the shaft bearing temperature (red). By maximizing this chart, you get a better view on the predictors.

image.png

Clicking the "Activate model" button will send a request to the TIM engine, asking it to build an anomaly detection model, apply it, and return the results.

image.png

Once a model has been built and applied, the dashboard will update with everything the TIM engine returns. On the left side of the dashboard, a set of buttons allow you to choose which predictors to use in the model. Input boxes allow you to set the start date and end date of the in-sample period, as well as the sensitivity parameter, and the start date and end date of the out-of-sample period.

image.png

In the line chart at the top, you can see the normal behavior TIM returned for both the in-sample (light blue line) and out-of-sample (yellow line) periods, next to the historical actuals (purple line). The anomalies TIM detected are indicated as dots on the purple line, in green (in-sample period) and red (out-of-sample period).

image.png

On the chart below, you can see the residuals: the difference between the historical actuals and the calculated normal behavior, for both the in-sample and out-of-sample periods.

image.png

On the chart titled "Anomaly indicator", the anomaly indicator for each of the in-sample observations is shown, as well as the anomaly indicator for each of the observations in the out-of-sample period. When this anomaly indicator crosses the threshold (exceeds 1), the corresonding observation is considered to be anomalous.

image.png

At the bottom of the dashboard, you can find two tables showing the predictor importances and feature importances, respectively.

image.png

In the first table (left), for each of the predictors that contributed to the anomaly detection is shown to what extent they contributed, and thus how important they are in the model.

image.png

In the second table (right), you can see a table showing the feature importances. It gives you a more detailed look into the model, by showing the features (transformations and interactions of predictors) that contribute to the anomaly detection, their type, and to what extent they contributed.

image.png