Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
Ouadie
Employee
Employee

Qlik AutoML is a powerful tool that makes it easy for analytics teams to easily generate models, make predictions, and test business scenarios using a code-free experience.

In a previous introductory blog post by Dipankar, you can learn more about how to get started with AutoML and find out just how easy it is to navigate the interface and start training and evaluating ML models in a few steps.

Today, we will leverage the power of Qlik Server-Side Extension (SSE) to build a simple Scenario Analysis dashboard right into Qlik Sense.

“What-if scenarios” are a great way to plan for decisions and actions by testing different parameters while capitalizing on AutoML’s prediction API.

So what is SSE?

Server-side Extension protocol allows us to extend the Qlik built-in expression library with functionality from external calculation engines. In our case, we will use AutoML’s re-calculation of the prediction based on changes on variables to show the result in a KPI chart.

Let’s go through the process in a practical example. We will look at Employee Turnover Risk (dataset attached at the end of the post)

  1. Create your AutoML project and load the dataset making sure to select the “left” field as the target. After successfully completing the training process, go ahead and deploy your model and enable API Access. Take note of the Access URL and Token, we will need them to make the connection in Qlik Sense.

    analyzing.PNGdeploy.PNG
  2. On our QS tenant, we need to create a new Data Connection via the "Qlik AutoML" Analytics source connector. If you don’t see it, make sure to enable Machine learning Endpoints in the Management Console.
    Inkeddata-connection_1.jpg

    data-connection 2.PNG

  3. Now, let’s move on to building our Scenario analysis sheet on the Qlik Sense app (find the qvf attached at the end of the post).
  • First, we create multiple variables to be used in our “Variable Input” objects. We concentrate on the features that are more important according to the Feature Importance chart.
    variables.PNG
  • Next, we create our objects:
    • The KPI that shows the Likelihood for Employees to leave is based on a measure that uses the SSE expression as follows, where some of the features are passed in as variables.
      P.S: note the first argument of the ScriptEvalEx matches the field types of our features in order - with N being number and S being string. Also, the features passed as the third argument need to map 1 to 1 with autoML, missing features will result in an error.

 

 

=endpoints.ScriptEvalEx('NNNNNNNSS','{"RequestType":"endpoint", "endpoint":{"connectionname":"Qlik_AutoML_Employee_Turnover","column":"probability_yes"}}',
vSatisfactionLevel AS satisfaction_level,
last_evaluation,
vNumberOfProjects AS number_project,
vAvgMonthlyHoursWorked AS average_montly_hours,
vTimeSpent AS time_spend_company,
Work_accident,
promotion_last_5years,
vDepartment AS sales,
vSalary AS salary)

 

 

  • Next. we build our variable inputs using the “Variable Input” chart under Custom Objects > Qlik Dashboard Bundle. Adjust the “Show as” type as needed.

variable input.PNG

And that’s all! You can now adjust the variables to trigger AutoML which automatically redistributes the data and re-predicts the outcome in order to understand the implication of any potential action.


Below, notice that Employee #2 has a high turnover %. Upon adjusting the “Avg Monthly Hours Worked”, “Number of Projects”, and “Salary” or a combination of these parameters, the % drops drastically.

 

changes what if.gif

Attached is the dataset used as well as the qvf.

I hope you found this post helpful!

4 Comments
Qlik-Gerardo
Partner - Contributor II
Partner - Contributor II

@Ouadie I'm really looking forward to try your example, thanks for the explanation it looks very good .

The excel file you shared is not the same (in the script is loaded as CSV) but is the same content, It can be easy exported to CSV, but there is a missing file ... Could you also share it?

lib://DataFiles/data-turnover-employee.csv
lib://DataFiles/Qlik AutoML Visual Export (1) shap.csv

Please keep posting this type of content related to Qlik AutoML.

Thanks in advance,

Gerardo

 

0 Likes
2,348 Views
Ouadie
Employee
Employee

@Qlik-Gerardo  I added the missing file, sorry about that.
Yes the content is the same, it just needs to be exported to CSV since I cannot attach that file type in particular so I had to upload it as xlsx

Thanks,

2,254 Views
Dipankar_Mazumdar
Former Employee
Former Employee

Nice post @Ouadie . Also, here is a video tutorial that I created for our Developer-focused playlist that shows how to build a predictive analysis dashboard using Qlik Sense & AutoML. 

2,229 Views
LiquidSword
Partner - Contributor III
Partner - Contributor III

Thank you very much! Very useful for showcasing autoML and What-If Anaysis

651 Views