Predictive queries can address a variety of predictive problems. The task type is determined by the structure of your query and influences:

  • The commands and operators used in the query.

  • The available evaluation metrics.

  • Explainable AI (XAI) options.

Kumo automatically determines the task type based on your Predictive Query (PQL).

Common Task Types

Task TypeOutputPQL Example
RegressionContinuous real numberPREDICT customers.age FOR EACH customers.customer_id
Binary ClassificationTrue or FalsePREDICT fraud_reports.is_fraud FOR EACH transactions.id WHERE transactions.type = "bank transfer"
Multiclass + Multilabel ClassificationClass labelPREDICT FIRST(purchases.type, 0, 7) FOR EACH users.user_id
Link PredictionList of itemsPREDICT LIST_DISTINCT(transactions.article_id, 0, 7) RANK TOP 10 FOR EACH customers.customer_id

Examples

Regression

A regression task predicts a continuous value. For example, predicting the total amount of purchases per customer over the next 30 days:

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

Kumo recognizes this as a **regression task** since it uses the `SUM()` operator without a boolean condition.

Binary Classification

A binary classification task predicts a true/false outcome. For example, predicting which customers will make no transactions in the next 30 days:

PQL
PREDICT COUNT(TRANSACTIONS.*, 0, 30, days) = 0
FOR EACH CUSTOMERS.CUSTOMER_ID
  • The = operator makes this a classification task.

  • Changing it to > would modify the positive label of the prediction.

For more Predictive Query examples across different task types, see the Predictive Query Examples.