HomeDocsAPI Reference
Kumo.ai
Docs

Task Types

Predictive queries help you solve a myriad of different predictive problems, and depending on your task type, you’ll use different commands and operators; furthermore, different evaluation metrics and explainable AI (XAI) mechanisms will be available.

Here are some common task types and the predictive problems they solve, along with related predictive query examples:

Task TypeOutputPQL Example
RegressionContinuous real numberPREDICT customers.age
FOR EACH customers.customer_id
Binary ClassificationT/FPREDICT fraud_reports.is_fraud
FOR EACH transaction.id
WHERE transaction.type = "bank transfer"
Multiclass ClassificationClass labelPREDICT FIRST(purchase.type, 0, 7)
FOR EACH user.user_id
Link PredictionList of itemsPREDICT LIST_DISTINCT(transactions.article_id, 0, 7) RANK TOP 10
FOR EACH customers.customer_id

📘

You can learn more about evaluating your Kumo models and XAI by exploring the following sections in Kumo docs:

For example, if the target of a predictive query uses the SUM() aggregation operator, the task type is a regression that produces a real-valued number for each entity, and Kumo will export the standard evaluation metrics for regression. Kumo automatically determines the task type based on your pQuery.

The following is an example of a predictive query for a regression task. The prediction “total number of sales each customer will make in the next 30 days” translates to the following PQL statement:

PREDICT SUM(TRANSACTIONS.PRICE,0,30,days)
FOR EACH CUSTOMERS.CUSTOMER_ID

Here’s an example of a predictive query for a binary classification task—the prediction: “customers that will not make any transactions (i.e., purchases) in the next 30 days” translates to the following PQL statement:

PREDICT COUNT(TRANSACTIONS.*,0,30,days) =  0
FOR EACH CUSTOMERS.CUSTOMER_ID

In the above example, using the > operator versus the = operator in the PREDICT clause would change the positive label in the predictive query.

You can view more examples of different predictive queries per task type in the Predictive Task Reference .