Batch Predictions

View as Markdown

Overview

After you are satisfied with the performance of your predictive query on historical data, you can generate batch predictions. Navigate to New > Prediction and select a model to run.

Creating a New Batch Prediction

To run batch predictions:

  1. Navigate to New > Prediction.
  2. Select a trained predictive model.
  3. (Optional) Adjust predictive query filters to apply target entity filtering.
  4. Configure batch prediction settings (anchor time, output destination, and so on).
  5. Submit the batch prediction job.

New Prediction page showing model selection and batch prediction setup

Existing Batch Prediction Jobs

To view the details of an existing batch prediction job, click on it from the Predictions page. Then click the job ID in the Batch Prediction Job ID column for more information.

Batch prediction job list with job ID column

Configuring Batch Prediction Settings

Applying Filters at Prediction Time

After training, you may want predictions for a specific subset of entities. Kumo lets you filter target entities by refining the dataset used for batch predictions.

Entity filter panel for refining batch prediction targets

Applying filters at batch prediction time:

  • Improves efficiency by reducing the amount of data processed.
  • Streamlines output by limiting predictions to relevant business logic.

Example 1: Changing Entity Filters

PQL
WHERE customers.status = 'ACTIVE' AND COUNT(transactions.*, -90, 0) > 0

Example 2: Adjusting Target Conditions

PQL
PREDICT LIST_DISTINCT(transactions.article_id
WHERE articles.product_type_name = 'Trousers'
AND transactions.price >= 50,
0, 90, days)
FOR EACH customers.customer_id
PQL
WHERE articles.product_type_name = 'Trousers' AND articles.color = 'blue'

Prediction Anchor Time

  • Set an optional prediction anchor time in ISO 8601 format (for example, 2024-02-27). If left blank, Kumo defaults to the latest timestamp in the fact table.

Prediction anchor time input field in ISO 8601 format

Settings Per Prediction Type

You also need to specify additional settings based on your prediction type. For example, a binary classification task requires setting a threshold (such as 0.5) to determine the point at which an object is considered part of the target class.

Batch prediction settings panel showing classification threshold configuration

Your editable options (for example, Threshold for Binary Classification) depend on the type of prediction task.

Output Destination

Specify where predictions should be stored. Available destinations:

  • AWS S3 (CSV, Parquet, or partitioned Parquet format)

  • Snowflake (overwrites existing table rows)

    The user account that you used to create the Snowflake connector must have permissions to create tables in Snowflake.
  • BigQuery (appends predictions to an existing table)

    The user account that you used to create the BigQuery connector must have permissions to create tables in your BigQuery data warehouse.
  • Local Download (sample output up to 1 GB)

    Output destination options including AWS S3, Snowflake, BigQuery, and Local Download

Parallel Processing

Specify the number of parallel workers (up to 4) to speed up batch predictions for large datasets.

Output Type

Choose the type of output:

  1. Predictions: The predicted target values for the selected entities.

  2. Embeddings: Numerical vectors of entities capturing their behavioral patterns.

    Output type selector showing Predictions and Embeddings options

Depending on your output destination, specify either an output directory (for S3) or a table name (for Snowflake/BigQuery).

If you select Local Download Only, you can download a sample of the outputs (up to 1 GB) and must specify a file type: either Parquet or CSV.

The resulting table contains a column for the entity ID, columns for predicted values or embeddings, and a timestamp column if relevant.

You can download a sample batch prediction output at any time, even if you write predictions to another data source.

You can choose to output both predictions and embeddings.

Running and Monitoring Batch Predictions

After you configure the settings, click Start Predicting to launch the batch prediction job.

Kumo redirects you to the batch prediction job details page, where you can monitor progress and download output samples.

Batch Prediction Outputs

Refer to Batch Prediction Outputs for details on the batch prediction outputs.

If you need to run inference on a different graph than the one used during training, refer to How do I generate predictions with a different graph than my training graph?.