Qlik Community

Qlik Server Side Extensions Documents

Documents related to Server-Side Extensions and Advanced Analytics Integration.

Data Science algorithms implemented as a Python SSE

Employee
Employee

Data Science algorithms implemented as a Python SSE

Project page: https://github.com/nabeel-oz/qlik-py-tools

Qlik's advanced analytics integration provides a path to making modern data science algorithms more accessible to the wider business audience. This project is an attempt to show what's possible.

This repository provides a server side extension (SSE) for Qlik Sense built using Python. The intention is to provide a set of functions for data science that can be used as expressions in Qlik.

Sample Qlik Sense apps are included and explained so that the techniques shown here can be easily replicated.

The implementation includes:

  • Supervised Machine Learning : Implemented using scikit-learn, the go-to machine learning library for Python. This SSE implements the full machine learning flow from data preparation, model training and evaluation, to making predictions in Qlik. In addition, models can be interpreted using Skater.
  • Unupervised Machine Learning : Also implemented using scikit-learn. This provides capabilities for dimensionality reduction and clustering.
  • Clustering : Implemented using HDBSCAN, a high performance algorithm that is great for exploratory data analysis.
  • Time series forecasting : Implemented using Facebook Prophet, a modern library for easily generating good quality forecasts.
  • Seasonality and holiday analysis : Also using Facebook Prophet.
  • Linear correlations : Implemented using Pandas.

For more information refer to the project page on GitHub.

For more information on Qlik Server Side Extensions see qlik-oss.

Disclaimer: This project has been started by me in a personal capacity and is not supported by Qlik.

Comments
maxsheva
Contributor II

Hi @Nabeel_Asif ,

Thanks for suggestion. I have grab both app and data file but result is with the same error. 

Capture1.JPG

I suppose there could be some missed or incorrectly installed Python library or other related to extension issue.

Could you please check log of Qlik-Py-Start

0 Likes
Employee
Employee

If you're still getting the error it looks like you're not using the latest version of the SSE.

The Qlik load script fails saying that there is no field called 'ds' at the point where the SSE returns the results. There is definitely a field called 'ds' returned in release 4.0 when you pass load_script=true to the Prophet function. This was not the case with release 3.9 and earlier.

maxsheva
Contributor II

@Nabeel_Asif,  many thanks!

It works with a new version of the SSE.

Let me adapt a script for another data and I will provide a feedback.

 

Much appreciated!

maxsheva
Contributor II

Hi @Nabeel_Asif ,

I have tried to integrate own data into solution. I am able to execute and get forecast results.

However I cannot understand how 'freq' parameter is working e.g. freq=D (W,M,MS,Y)

I see yhat forecast is the best when freq=D but it is still less than 20% from real numbers. For sure I may multiply result * 1.2 but wondering whether any option to adjust it using built-in Prophet parameters?

0 Likes
dubdev
New Contributor

Hi @Nabeel_Asif , I'm new to use analitycs with Qlik and python. Are there some functions in your extension for binary classification? Like kNN or SVM/SVC and others. Is it possible to realise binary classification with stock function of this extention? I'll be gratefull for advise.

0 Likes
Employee
Employee

@dubdev , yes this SSE has functions that support both classification and regression. Most of the algorithms from the scikit-learn library are supported. 

For usage information please head over to the project's GitHub repository: https://github.com/nabeel-oz/qlik-py-tools 

Employee
Employee

@maxsheva , the Freq parameter is based on the granularity of your data so there is only one correct option for a given dataset, for e.g. D if you have daily data. 

The forecast will not align perfectly with historical values as that would be overfitting the model to a sample of data. However, there are a few ways to adjust the output explained here: https://github.com/nabeel-oz/qlik-py-tools/blob/master/docs/Prophet.md

Version history
Revision #:
2 of 2
Last update:
‎2019-01-08 11:06 PM
Updated by: