Documentation > Predictions > Batch Predictions

Batch Predictions

Batch Prediction allows you to efficiently generate predictions for an entire dataset using one of your trained models. Instead of inputting data row by row, you select an existing dataset, and the system processes all records in the background, making it ideal for large-scale scoring tasks.

Use Batch Prediction when you need to score a customer base, evaluate the potential outcome for a list of leads, apply a model to historical data for analysis, or any scenario requiring predictions on multiple records simultaneously. The results are stored and can be reviewed later.

Batch Prediction Process

Automatic summary generation for prediction batches

Input Data
Trained Model
Predictions
Summary

Accessing Batch Predictions

Similar to Real-Time Predictions, you access the Batch Prediction feature from a specific model's detail page:

  1. Navigate to the Models section.
  2. Select the trained model you want to use for batch processing (e.g., `Model ID123`).
  3. Find the Predict or similar option, leading to the Prediction Interface page.
  4. On the Prediction Interface page, click the button labeled Batch Prediction.

This will reveal the components needed for selecting a dataset and managing batch prediction jobs.

Example ML Clever dashboard showing various components

Interface Anatomy

When Batch Prediction mode is active, the interface typically includes these components:

[Image: Screenshot of the interface in Batch mode: Dataset Selection, Initiate Button, Ongoing List, Completed List]

Dataset Selection & Initiation

This area allows you to choose the input data and start the process:

  • Dataset Selection: Uses a component (like `DatasetUploadComponent`) to browse and select an existing, compatible dataset from your project.
  • Selected Dataset Display: Shows the name of the chosen dataset (`dataset.name`). May include an icon indicating if the dataset is preprocessed (dataset.preprocessed).
  • Predict Button: Clicking this initiates the batch prediction job for the selected dataset using the current model. (Ref: `BatchPrediction.vue`)

Ongoing & Completed Batch Predictions

This section (Ref: `HistoricalBatchPredictions.vue`) tracks the status of your batch jobs:

  • Ongoing Predictions List: Displays jobs currently being processed.
  • Completed Predictions List: Shows jobs that have finished (either successfully or with errors).
  • Batch Card: Each list item shows key info: submission date (`batch_date`), average prediction output (`average_output`, if applicable), and current status (`status`).
  • Status Indicator: A visual cue (e.g., colored circle , , ) next to the status text (`ongoing`, `completed`, `failed`).
  • Real-time Updates (): The lists update automatically as jobs progress, receiving information via WebSockets (listening for `batch_prediction_update` events).
  • View Details: Clicking on a batch card opens a modal with detailed results.

Batch Details Modal

Opened by clicking a card in the historical lists, this modal (Ref: `BatchPredictionDetails.vue`) provides comprehensive information about a specific batch run.

It includes summary statistics, input data overview, and paginated individual prediction results. (See Viewing Batch Results section below for more details).

Starting a Batch Prediction

Initiating a batch prediction job involves these steps:

1

Ensure "Batch Prediction" Mode is Active

Verify you are in the batch prediction view. If necessary, click the Batch Prediction button.

2

Select Input Dataset

Use the dataset selection component (`DatasetUploadComponent` provided by the parent `PredictionInterface.vue`) to choose the dataset containing the records you want to predict on. The selected dataset's name will appear.

[Image: Close-up of the Dataset Selection component and the display area showing the selected file]
3

Click "Predict"

Click the Predict button within the "Batch Prediction" section (Ref: `BatchPrediction.vue`). This sends a request to the backend (e.g., POST /batch_predict/{dataset.id}) with the model_id to start processing the selected dataset.

4

Monitor Progress

The batch job runs in the background. You can monitor its progress in the Ongoing Batch Predictions list. Once finished, it will move to the Completed Batch Predictions list.

Monitoring Batch Runs

The `HistoricalBatchPredictions` component provides visibility into your running and completed jobs:

[Image: Screenshot of the Ongoing and Completed Batch Prediction lists with status indicators]

Ongoing List

Shows jobs currently in progress. Their status will typically be "ongoing".

/ Completed List

Shows finished jobs. Their status will be "completed" or "failed".

Real-time Updates

The component listens for WebSocket events (batch_prediction_update on the /batch_predictions namespace) to automatically update the status, average output, and potentially move jobs between lists without requiring a page refresh.

Accessing Details

Clicking anywhere on a batch card (ongoing or completed) will trigger the opening of the details modal for that specific `batchId`.

Viewing Batch Results

Clicking on a batch card in the historical lists opens a detailed modal view (`BatchPredictionDetails.vue`) fetched via /batch-predictions/details/{batchPredictionId}:

[Image: Screenshot of the Batch Prediction Details modal showing header, summary, pagination, and results table]

Header Information

Provides a summary of the batch run:

  • Batch Date: When the job was submitted.
  • Average Output: The mean of the predicted values across the entire batch (useful for regression).
  • Status: The final status (`completed`, `failed`).
  • Mean Probability (Classification): If applicable, shows the average probability assigned to each class across all predictions in the batch.

Input Data Summary

Displays summary statistics (like mean, min, max, count) for the input features used in the batch prediction, provided by the `InputDataSummary` component.

Paginated Individual Results

Since batch jobs can process thousands or millions of rows, the individual results are paginated:

  • Pagination Controls: Provided by `PredictionPagination.vue` to navigate through pages of results.
  • Results Table: (`BatchPredictionResults.vue`) Displays a table for the current page, showing:
    • Row Number (#)
    • Prediction Input (Key-value pairs of features and their values for that row)
    • Prediction Output (The prediction generated for that row)

Additional Details

May include a section (`batchPrediction.details`) with supplementary information or logs related to the batch run, displayed in a preformatted block.

Understanding Key Details

Here's a quick reference for some specific fields you'll encounter:

FieldDescription
Status

ongoing: The job is currently processing.

completed: The job finished successfully.

failed: The job encountered an error during processing.

Average OutputThe arithmetic mean of all numerical prediction outputs in the batch. Primarily useful for regression models. May be 'N/A' if not applicable or during processing.
Mean ProbabilityFor classification models, this shows the average probability calculated for each class label across all predictions in the batch. Useful for understanding overall model confidence on the dataset. Format: `'ClassName1': 0.75, 'ClassName2': 0.25`.

Related Concepts

After running batch predictions, you might explore:

Real-Time Predictions

Make instant predictions with interactive inputs.

Make Single Predictions

Prediction API

Connect your applications to model predictions via API.

Integrate via API

Was this page helpful?

Need help?Contact Support
Questions?Contact Sales

Last updated: 5/5/2025

ML Clever Docs