Documentation > Predictions > Real-Time Predictions

Real-Time Predictions

The Real-Time Prediction interface allows you to instantly generate predictions from your trained models for a single set of inputs. It provides an interactive form tailored to your model's features, enabling quick testing, exploration, and what-if analysis without writing any code.

This is ideal for situations where you need an immediate prediction based on specific, user-provided data points, such as evaluating a single customer application, testing model behavior with hypothetical inputs, or integrating manual checks into a workflow.

Example ML Clever dashboard showing various components

Accessing Real-Time Predictions

You typically access the real-time prediction feature from the details page of a specific trained model:

  1. Navigate to the Models section.
  2. Select the desired trained model to view its details (e.g., `Model example-model-123`).
  3. Within the model details or prediction area, look for a "Predict" or similar option. This often leads to the Prediction Interface page.
  4. On the Prediction Interface page, you'll typically see options for different prediction modes. Click the button labeled "Single Prediction" or "Real-Time Prediction".

This will load the interface components specifically designed for making individual predictions.

Example ML Clever dashboard showing various components

Interface Anatomy

The Real-Time Prediction screen is typically composed of several key areas:

Example ML Clever dashboard showing various components

Model Header

Displays key information about the selected model, such as its name, score, type (regression/classification), training time, dataset category, and target column. This provides context for the predictions being made.

Model Name: Customer Churn Predictor v2

Score: 0.85

Type: Classification

Target: Churn_Status

Prediction Input Form

This is the core interactive area where you provide the input values for your prediction. Key elements include:

  • Input Fields: Dynamically generated based on the features the model was trained on. Each field corresponds to a column in your training data.
  • Data Types: Supports various input types like text (text), numbers (number with steps), and dropdowns (select for categorical features).
  • Placeholders/Defaults: Fields may show placeholder text or default values based on the training data.
  • Feature Importance (Optional): If available, visual bars and numerical values indicate the relative importance of each feature for the model's predictions. (See Feature Importance section below).

Prediction Result

Displays the outcome generated by the model based on your inputs. This includes:

  • Predicted Value: The primary output of the model (e.g., a numerical value for regression, a class label for classification). This value is often briefly highlighted upon generation.
  • Target Column Name: Explicitly states the name of the variable being predicted (e.g., `Price`, `Churn Status`).
  • Class Probabilities (Classification): For classification models, this section shows the model's confidence score (probability) for each possible class label. The predicted class is usually highlighted.
  • Placeholder Value: Before a prediction is made, this area might show an average value (for regression) or a default class (for classification) based on the training data.
  • Predict Button: The button used to submit your input data and trigger the prediction process.

Historical Predictions

Provides a record of past single predictions made using this specific model via the interface. Features include:

  • Prediction List: Displays a summary of past predictions, typically including the date and the prediction output.
  • View Details Button: Allows you to open a modal window for a specific historical prediction.
  • Details Modal: Shows the full input values used for that prediction alongside the date and output, allowing you to review the exact context of past results.

Making a Prediction

Follow these steps to generate a real-time prediction:

1

Ensure "Single Prediction" Mode is Active

Verify you are in the single/real-time prediction view. If you see options for "Batch Prediction" and "Single Prediction", ensure the latter is selected.

2

Enter Input Data

Fill in the values for each field in the Prediction Input Form. Use the appropriate format based on the field type (text, number, selection from dropdown).

Example ML Clever dashboard showing various components
3

Click Predict

Once all necessary inputs are provided, click the Predict button located within the Prediction Result area. The system will send your input data to the model via the /predict API endpoint.

4

View the Result

The Prediction Result section will update almost instantly to display the model's output based on your inputs. For classification models, class probabilities will also be shown.

Understanding the Prediction Results

The results section provides the model's output and associated confidence information:

Example ML Clever dashboard showing various components

Predicted Value

This is the main output. For regression models, it's a continuous numerical value. For classification models, it's the most likely class label. The result briefly highlights (e.g., fades in) when updated.

Target Column Name

Clearly indicates which variable the model is predicting (e.g., Churn_Status).

Class Probability / Confidence Intervals (Classification)

If you are using a classification model, this section lists each possible class label along with the probability (confidence score) assigned by the model. The class label corresponding to the main `Predicted Value` is often visually distinct (e.g., bolded or colored).

Note: These probabilities represent the model's confidence in its prediction for the given input.

Feature Importance

If feature importance data is available for your model, it will be displayed directly within the Prediction Input Form alongside each input field. This provides insight into which features had the most influence on the model's predictions *in general* (based on the training data).

Example ML Clever dashboard showing various components

Visual Representation

A horizontal progress bar visually represents the importance score. Longer bars indicate higher importance.

Numerical Value

The precise importance score is displayed next to the bar (e.g., `0.7521`). Higher values signify greater influence.

Interpretation

This global feature importance helps you understand which inputs generally drive the model's behavior. Note that this differs from Prediction Explanations, which detail the influence of inputs on a *specific* prediction.

Note: Feature importance scores are typically fetched once when the input fields are loaded via the `/generate_input_fields` endpoint.

Viewing Historical Predictions

The "Historical Predictions" component (HistoricalPredictions.vue) keeps a log of the single predictions you've made using this interface for the current model. This is useful for reviewing past tests or analyses.

Example ML Clever dashboard showing various components

Browse the List

Scroll through the list to see past predictions, typically showing the date and the main prediction output.

View Details

Click the View Details button next to any prediction in the list.

Inspect Details in Modal

A modal window will appear, displaying:

  • The date the prediction was made.
  • The prediction output(s).
  • A detailed breakdown of all the input values (feature names and their corresponding values) that were used to generate that specific prediction. Missing values might be shown as "N/A".

Historical data is fetched from the /predictions/example-model-123 endpoint.

When to Use Real-Time vs. Batch

Use Real-Time Predictions When:

  • You need an immediate prediction for a single instance or record.
  • You want to interactively test the model with specific inputs (what-if scenarios).
  • You are performing manual spot-checks or integrating single predictions into a user-facing workflow.
  • The input data is readily available for manual entry.

Consider Batch Predictions When:

  • You need to generate predictions for many records simultaneously (e.g., an entire dataset).
  • Input data is stored in a file (CSV, etc.).
  • Efficiency for bulk processing is required.
  • You want to store the results for a large number of predictions systematically.
  • See the Batch Predictions documentation for details.

Related Concepts

Explore these related features to further leverage your models:

Batch Predictions

Process large datasets for bulk predictions.

Learn about Batch Processing

Prediction Explanations

Understand why the model made a specific prediction.

Understand Model Decisions

Prediction API

Connect your applications to model predictions via API.

Integrate via API

Prediction Interface

Overview of the prediction tools.

Prediction Interface Overview

Was this page helpful?

Need help?Contact Support
Questions?Contact Sales

Last updated: 5/4/2025

ML Clever Docs