Skip to main content
All CollectionsGenerating Predictions
Use Your Model to Generate Predictions Using a CSV File
Use Your Model to Generate Predictions Using a CSV File

Creating predictions using a CSV file in Pecan is straightforward and empowers you to leverage your trained models for immediate insights.

Ori Sagi avatar
Written by Ori Sagi
Updated over 4 months ago

At Pecan, we’re committed to making predictive analytics accessible and actionable for every user, regardless of their technical background. One of the key features we offer is the ability to generate predictions directly from CSV files.

This method provides a flexible way to utilize your models with new data for immediate insights. Whether you’re responding to shifting market conditions, performing what-if analyses, or testing hypotheses, this feature simplifies the process. Here’s a detailed guide on how to navigate this functionality effectively:

Step 1: Navigate to the “Predict” Tab

Log into your Pecan platform, and head over to the “Predict” tab within your predictive flow dashboard. This is where all prediction activities are managed:

Step 2: Initiate One-Time Prediction from CSV

Click on the “One-time predict from CSV” option. This allows you to generate a single batch of predictions using new data that you provide.

Step 3: Select or Upload Your Data Tables

In this window, you can choose from previously uploaded tables or upload new ones. This includes the core-set and attribute tables that your model uses.

The new tables must match the schema of the tables used to train your model.


After defining your tables, click Review queries to see the generated SQL queries.

Step 4: Review Your Queries

These queries are adapted from those in your notebook but are configured to utilize the newly specified tables.

Once you’ve reviewed and confirmed that the queries are correctly set up, click Predict on new data. This action submits your data for prediction processing.

Step 5: Download Your Predictions

After your predictions are processed, you’ll receive an email notification. You can then return to the same page to download the results in a CSV file format, ready for any further analysis or reporting needs.

Please Note:

Due to the manual nature of this process, scheduling automatic predictions is not available for CSV-based inputs. If you require scheduled predictions, consider establishing a live connection to your data warehouse.

Possible Errors

Mismatch between Entity Train columns and Entity Predict columns

This error means that the CSV file you are trying to use to make predictions has a different schema than the on used to train your model.

When making predictions using a CSV file, it’s crucial that the file’s schema matches exactly with the schema used during the model training.

Imagine your model as a complex decision tree, which uses specific columns to make decisions at each node. If a column is missing or named differently in your CSV, the model cannot proceed. It’s like missing a crucial turn in a maze—without it, the model can’t find its way to a conclusion.

To fix this error:

  • Ensure all columns from the training phase are present in your prediction CSV.

  • Column names must match exactly, including their spelling and case.

  • Data types in each column (e.g., numeric, text) should also match.


Summary

This feature is designed to provide flexibility and control over how you apply your predictive models to new datasets. Whether you’re testing scenarios or need predictions on an ad-hoc basis, CSV-based predictions in Pecan make it possible in just a few clicks.

You can use this feature to enhance your data-driven decisions. If you encounter any issues or have further questions, our support team is ready to assist you every step of the way.

Did this answer your question?