HomeDocsAPI Reference
Kumo.ai
Docs

Each batch prediction represents a particular run of your selected predictive query, resulting in the creation of a table with the entity primary key IDs (i.e., the remaining IDs after applying entity/temporal entity filters) and the actual prediction output.

The actual prediction output will vary depending on what task types are used in your predictions, and whether they are temporal in nature. For example, if your predictive query is a temporal task type (e.g., temporal regression, temporal binary/multiclass classification or ranking, temporal link prediction), the output table will also include the the anchor time of the prediction (i.e., what a prediction horizon start time of "zero" refers to), as configured in your individual batch prediction job; if no anchor time was specified, Kumo by default will use the latest timestamp in your predictive query target formula's fact table.

Whenever you run a batch prediction, Kumo will automatically first refresh all of the data in your graph to make sure you are using the latest available data (unless the data was already recently refreshed).

Example Prediction Output: Static (Non-Temporal) Binary Classification

Consider the following prediction output for whether a customer will like a particular item on your website:

ENTITYSCORE
00.700517
10.601757
20.446016

The ENTITY column contains the primary key IDs of another table containing the binary (i.e., true/false) values signifying whether a particular customer liked an item or not—this other table would also include the respective item id and customer id. The SCORE column represents the likelihood that the predictive query would evaluate to true.

Please refer to the predictive query section to view a full example of a non-temporal binary classification task's PQL statement, data model, and output.

Example Prediction Output: Temporal Binary Classification

If Oct. 17th 2022 is the last date in your data source, and you are predicting whether a customer churns tomorrow (Oct. 18th, 2022) for each of your 10,000 customers, the prediction output table will look like the following:

ENTITYTIMESTAMPTARGET_PREDFalse_PROBTrue_PROB
02022-10-18False0.7005170.299483
12022-10-18False0.6017570.398243
22022-10-18True0.4460160.553984

The False_PROB and True_PROB columns contain the predicted probability this customer churns. The threshold for binary classification you set during batch prediction determines how high the predicted probability must be for us to consider this a positive class prediction. Based on the predicted probability and the threshold, Kumo outputs True (churn) or False (doesn't churn) in the TARGET_PRED column.

Please refer to the predictive query section to view a full example of a temporal binary classification task's PQL statement, data model, and output.

Example Prediction Output: Static (Non-Temporal) Regression

If you are predicting the age of your customers—a regression task—the batch prediction output will look like the following:

ENTITYTARGET_PRED
029
117
240

The TARGET_PRED contains the predicted age of your customer.

Please refer to the predictive query section to view a full example of a non-temporal regression task's PQL statement, data model, and output.

Example Prediction Output: Temporal Regression

If you would like to predict the amount of money a customer would spend on Oct. 18th—a temporal regression task—the batch prediction output will look like the following:

ENTITYTIMESTAMPTARGET_PRED
02024-10-1820.398209
12024-10-185.238759
22024-10-180.000000

The TARGET_PRED contains the amount of the money the customer is predicted to spend on October 18, 2024.

Please refer to the predictive query section to view a full example of a temporal regression task's PQL statement, data model, and output.

Example Prediction Output: Static (Non-Temporal) Link Prediction

If you would like to predict the top ten unique items each customer is likely to purchase—a static link prediction task—the batch prediction output will look like the following:

ENTITYCLASSSCORE
17337490010.6874649124
15347465020.6624874491
17330017490.6746829124
18004415020.6846829493
15347464920.6874624491
14649534720.6874491236
18502440010.6875469162
17598710020.6834917462
1464946430.6874624491
17465344920.8746749124

Please refer to the predictive query section to view a full example of a temporal link prediction's task's PQL statement, data model, and output.

Example Prediction Output: Temporal Link Prediction

If you would like to predict the unique items each customer is likely to purchase in the next 30 days—a temporal link prediction task, the batch prediction output will look like:

ENTITYCLASSSCORETIMESTAMP
07337490010.68468294932022-10-18
18502440010.68746244912022-10-18
27598710020.66248744912022-10-18

Please refer to the predictive query section to view a full example of a temporal link prediction's task's PQL statement, data model, and output.


What’s Next