Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Community
I am trying to bring in real time predictions using the newly available AutoML Connection for Qlik Cloud.
I have used the following expression in the KPI visualization to pass parameters to the ml deployment :
Just changing discount rate using variable input
endpoints.ScriptAggrEx('SNNNNNNN','{"RequestType":"endpoint", "endpoint":{"connectionname":"qlik_comp_retail_data:Customer_Qlik_AutoML", "column":"total_order_value_180_days"}}',
customer_id,
days_since_1st_order,
recency,
frequency,
monetary,
vDiscountRate as avg_discount_rate,
avg_days_between_orders,
RFM_score
)
But I am facing this error
Is there any error in the script or this is not supported yet?
I am successfully able to get predictions from load script using
LOAD * EXTENSION endpoints.ScriptEval('{"RequestType":"endpoint", "endpoint":{"connectionname":"qlik_comp_retail_data:Customer_Qlik_AutoML"}}', Customer_value_next_period_apply_final);
I created the connection qlik_comp_retail_data:Customer_Qlik_AutoML suing new AutoML connector and using same in the abovce expression in visualization.
Thanks
Hi @priy ,
There are a few troubleshooting steps to take here:
1. Try changing the function to ScriptEvalStr and remove the first parameter ('SNNNNNNN',). AutoML does its own data type handling, so sending all as string reduces issues occurring before request is even made.
2. An error can be returned if a NULL value is not being handled correctly, sometimes where you may not expect one, so I've found that adding null handling (such as Coalesce) helped address that issue.
3. Finally, the connector can sometimes have issue processing too many records, so I'd recommend adding a calculation condition to the visual so that it only calculates if one record has been selected (then you can gradually increase that limit to test the threshold before you start receiving errors).
Hope this helps get you back on track,
Kyle
Hey Kyle_Jourdan
Thanks for your input, your ideas for troubleshooting were really helpful. They helped to reach to the solution. I was doing following things wrong:
1. Actually I was passing customer_id which was not included in my deployed model as its cardinality was high.
2. The column name that wanted to bring was total_order_value_180_days_predicted. "_predicted" is added by the autoMl.
Thanks for your help.
Hi @priy ,
There are a few troubleshooting steps to take here:
1. Try changing the function to ScriptEvalStr and remove the first parameter ('SNNNNNNN',). AutoML does its own data type handling, so sending all as string reduces issues occurring before request is even made.
2. An error can be returned if a NULL value is not being handled correctly, sometimes where you may not expect one, so I've found that adding null handling (such as Coalesce) helped address that issue.
3. Finally, the connector can sometimes have issue processing too many records, so I'd recommend adding a calculation condition to the visual so that it only calculates if one record has been selected (then you can gradually increase that limit to test the threshold before you start receiving errors).
Hope this helps get you back on track,
Kyle
Hey Kyle_Jourdan
Thanks for your input, your ideas for troubleshooting were really helpful. They helped to reach to the solution. I was doing following things wrong:
1. Actually I was passing customer_id which was not included in my deployed model as its cardinality was high.
2. The column name that wanted to bring was total_order_value_180_days_predicted. "_predicted" is added by the autoMl.
Thanks for your help.
Hello Everybody,
I've the same problem.
I need help about advanced analytic connector with Qlik AutoML on visualisation's side. I already succeed to creat an advanced analytic connector in developpement's side and it work. But i don't understand how the fonction 'scripteval' work on visualisation's side.
I have a data set about Churned and i want to creat a sheet with a prediction's simulation.
Here my script:
endpoints.ScriptEval('{"RequestType":"endpoint", "endpoint":{"connectionname":"Qlik AutoML:Customer_Cancellations_Apps_Qlik_AutoML", "column":"Churned"}}',
vTerritory as Territory,
vTerritory as DeviceType,
vPromotion as Promotion,
vHasRenewed as HasRenewed,
vPlanType as PlanType,
vBaseFee as BaseFee,
vNumberOfPenalties as NumberOfPenalties,
vCurrentPeriodUsage as CurrentPeriodUsage,
vPriorPeriodUsage as PriorPeriodUsage,
vServiceRating as ServiceRating,
vServiceTickets as ServiceTickets,
vStartMonth as StartMonth,
vStartWeek as StartWeek,
vCustomerTenure as CustomerTenure)
And i facing the same error
The first thing I'd suggest is to make sure you have created all those variables you are using and that they are populated.
Next, ScriptEval is not the correct function to use for this use case. It should be ScriptEvalStr or ScriptEvalEx (we recommend using ScriptEvalStr for simplicity).
Finally, the value you have for the "column" parameter cannot be correct. The AutoML API will always return the name of the target, an underscore, and one of the possible prediction outcomes. For example, if your target column is called "Churned" and the possible outcomes are "yes" or "no", the column would be called "Churned_yes".
Bonjour,
merci beaucoup pour votre aide. En effet, le problème venait bien :
- de la fonction ScriptEval. Il fallait utiliser ScriptEvalStr()
- et de la colonne cible "Churned" qui s'appelle bien "Churned_" suivi de la valeur souhaitée, issue de la table de prédiction.
Hello , i have a question related to this but using a custom API and am analytics connector. how can i pass dynamic parameters in ScriptEvalStr() , i am using the connector to connect to a custom API , but i need to pass dynamic parameters