Skip to main content
MAINTENANCE ALERT: Dec. 12th starting 9 AM CET. Community will be read-only. GET DETAILS
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Forecasting Using Python with Deep Learning

Hello Everyone,

I have been testing AAI SSE with python. While it seems like an extremely flexible tool, I am not sure it can provide what I seek. I was hoping some of you could answer that question.

Currently, I have been able to:

  1. Use LOAD ... EXTENSION ... in the data load editor with success
  2. Basic custom made functions used in expressions editor

I am mainly interested in using this extension to make forecasting using more advanced models than common ARIMA. What I am most likely going to be using are deep learning models such as long short-term memory models (LSTM). These type of models can provide predictions/forecasting with several fields as an output. Thus, the output might be 3 fields (e.g. date, shop, sales count) and 30 rows (e.g. 1 row for each future day). 

An example of Actual data:

16-12-2019Shop A55
16-12-2019Shop B54
17-12-2019Shop A87
17-12-2019Shop B65
18-12-2019Shop A23
18-12-2019Shop B53
19-12-2019Shop A12
19-12-2019Shop B89


An example of Predicted data from model:

20-12-2019Shop A55
20-12-2019Shop B54
21-12-2019Shop A87
21-12-2019Shop B54
22-12-2019Shop A38
22-12-2019Shop B25


All the forecasting examples I have seen so far, are only using ARIMA which provide forecasting with 1 field as an output (e.g. sales). The several fields as an output from the deep learning models seem to be an issue when the output is provided by using a custom function in the expression editor in qlik - fx as a line in a linechart. 

The single output is also seen in the video tutorial published by Qlik:

forecasting ARIMA.png


So to wrap this up with my questions:

  • Can a custom python function that is called in a Qlik expression return several fields at once to Qlik?
    • If so can all the fields be displayed in a table (e.g. like the prediction table above)? or will it only work for specific charts?
    • As an example by using the data in the tables above; If I am creating a line chart using sales as a measure and shop as a dimension into several lines. Will I be able to use the predicted data to create forecasting in this linechart?


Thank you so much for your time. 

Labels (1)
1 Reply
Contributor II
Contributor II

in the example of EchoTable_3 functions, it seems that several results have been echoed back, Haven't tried it by myself. 

A return row can have mutiple Duals DataType