Sales forecasting with spreadsheet integration

How deep learning can solve real business problems directly from your spreadsheets

This tutorial will show you how to use the full power of the Peltarion Platform in a real world situation.
You will build a model that predicts daily sales revenue from many parameters. The platform lets you deploy this model for production, allowing you to directly integrate predictions in your Google Sheets or integrate predictions in your Microsoft Excel spreadsheets.

Person - Target audience: Beginners
Clock - Estimated time: Setup - 10 min | Training - 5 min | Deployment - 1 min

You will learn to
Peltarion logo - Build a deep learning model with no code.
Peltarion logo - Predict sales numbers from spreadsheet data.
Peltarion logo - Deploy your model for production on the Peltarion Platform.
Peltarion logo - Integrate your model with Google Sheets or Microsoft Excel.

Rather watch?

Create a project

Let’s begin! Log in to the Peltarion Platform and click New project. Name the project, e.g. Sales, so you know what kind of project it is.

New project button

Import the data

After creating the project, you will be taken to the Datasets view, where you can import data.

Use our data library

Click the Import free datasets button.

Import free datasets button

Look for the Sales forecasting - tutorial data dataset in the list. Click on it to get more information.

If you agree with the license, click Accept and import.

This will import the dataset in your project, and you can now edit it.

The sales forecasting dataset

There are few companies that openly share revenue data. So for this tutorial, we’ve generated a synthetic dataset that looks like the real thing but is free to use.

The dataset contains daily values for many different shops over a couple of years, such as the date, national holidays, type of shop, ongoing advertisement and promotion campaigns. The appropriate feature encoding is selected automatically and the dataset is now ready to be used in an experiment.

The shop’s daily revenue is also given, which is what the model will learn to predict, your target.

How to import your own tabular data

When you’re done with this tutorial and want to upload your own tabular dataset, you can do it by uploading a CSV to the platform. Make sure the file follows out requirement.

Build the model

In the Datasets view click Use in new experiment.

Use in an experiment

Experiment wizard

The Experiment wizard makes it really easy for you to set up an experiment. Let’s take a look and make sure that all presets are correct:

  • Dataset tab
    The Sales forecasting dataset is selected.

  • Input(s) / target tab

    • In the Inputs column, select everything EXCEPT the Date, Year, and Revenue (since it’s the target).
      We won’t use specific time information, like Date and Year, to train the model because we want to make predictions for any future (or long past) date.
      Features like the week number provide enough information about the time period, i.e., if an example is from winter or summer, while being general enough to work for any future year.

    • Select Revenue in the Target column. The target is what the model will learn to predict.

  • Problem type tab
    Given the inputs and target selected, the wizard automatically recommends Tabular regression as Problem type.

  • Click on Create, and the wizard will create a model that fits your tabular data.

Create button

Modeling view

Everything is set in the Modeling view thanks to the wizard. Click Run to start training your model.

Run button

As the model trains, you can follow its performance in the Evaluation view.

Evaluate your model

The Evaluation view shows you how the model performance improves as the training progresses. The loss and metrics plot gives an overall idea of the training process. You can also check the scatter plot in the Predictions inspection tab to see predictions of specific examples.

Training will stop automatically when the model stops improving thanks to early stopping. The experiment status will change from Running to Early stopped, and you can move on to the next section to deploy your model.

Further experimenting

In this tutorial we’ve built a simple model.
However, you can easily Iterate or even Duplicate your experiment to try different model configurations.

To do that, go back to the Modeling view, and click on Iterate.

  • Continue training will let you train the same model for more epochs.

  • Reuse part of model creates a new experiment with a single block that contains the model you just trained. This is useful to build another model around the current one.

To make more modifications to the model, go back to the Modeling view, and click on Duplicate. This will create a copy of your current model that you can edit, but training progress will be lost.

The tutorial How to improve a model that uses tabular data goes into more details about how to proceed.

Deploy your model

In the Evaluation view click Create deployment.

Create deployment button
  • Select the Experiment that you want to deploy.
    An experiment corresponds to a particular model trained with specific settings. There should only be one available, unless you have experimented with different models in your project.

  • Select the Checkpoint you want the deployed model to use.
    Checkpoints are made throughout training. Select the Best checkpoint, since this is when the model had the best performance.

Click Enable to let your deployment go live! You can now send requests to your model from anywhere, anytime.

Enable button

Tutorial recap

Congratulations, you have now completed the sales forecasting tutorial! You have:

  • Built a simple model which

  • Analyzed a large amount of tabulated data to

  • Solved a regression problem.

This dataset is very simple, but much more can be done with the use of deep learning. Deep learning for sales forecasting could for example use combinations of complex data types like images and text. To see how to solve problems using other types of data, check out our other tutorials.

Next tutorial - Integrate your model directly inside your spreadsheets

Time to integrate your model directly inside your spreadsheets. When a model is deployed, the Peltarion Platform makes it available to you from anywhere with an HTTP connection. This means that you can use the Deployment API to get predictions in your applications. We’ve created add-ins for Google spreadsheets and Excel to make it super easy for you to leverage the Peltarion Platform from your favourite tool.

You will learn to

sales for sheets plus excel
Was this page helpful?