---
title: Time series predictions
description: Understand the prediction methods used with DataRobot's time series modeling.
---

# Time series predictions {: #time-series-predictions }

!!! info "Availability information"
     Contact your DataRobot representative for information on enabling automated time series (AutoTS) modeling.

See these additional considerations for working with [time series](ts-consider) modeling.

Before making predictions, prepare your model, as described in the following sections.


{% include 'includes/date-time-include-5.md' %}



## Make Predictions tab {: #make-predictions-tab }

There are two methods for making predictions with time series models:

1. For prediction datasets that are less than 1GB, use the **Make Predictions** tab from the Leaderboard. This is the method described below.

2. For prediction datasets between 1GB and 5GB, consider deploying the model and using the [batch predictions capabilities](batch-pred#predictions-for-time-series-deployments) available from [**Deployments** > **Predictions**](batch-pred).

!!! note
    Be aware that using a forecasting range with time series predictions can result in a significant increase over the original dataset size. Use the batch predictions capabilities to avoid out-of-memory errors.

The Leaderboard **Make Predictions** tab works slightly differently than with traditional modeling. The following describes, briefly, using **Make Predictions** with time series; see the full [**Make Predictions** tab details](predict) for more information.

!!! note
    ARIMA model blueprints must be provided with full history when making batch predictions.

The **Make Predictions** tab provides summaries to help determine how much recent data&mdash;either time unit or rows, depending on how you configured your [feature derivation and forecast point](#set-window-values) windows&mdash;is required in the prediction dataset and to review the forecast rows and [KA](#known-in-advance) settings. Note that the list of features displayed as KA only includes those KA features that are part of the feature list used to build the current model. The [**Forecast Settings**](#forecast-settings) tab provides an overview of the prediction dataset for help in changing settings as well as access to the auto-generated [prediction file template](#prediction-file-template).

In this example, the prediction dataset needs at least 42 days of historical data and can predict (return) up to 7 rows. That is because although the model was configured for 35 days before the forecast point, seven days are added to the required history because the model uses seven-day differencing. Generally, `Historical rows = FDW size + seasonality`, where seasonality is the longest periodicity detected. Note that rows needed for _training_ are calculated as `Historical rows = FDW size + seasonality + FW size`.

![](images/time-predict-1.png)

The following provides an overview to making predictions with time series modeling:

1. Once you have selected a model to use for predictions, if you haven't already done so you are prompted to unlock holdout and [retrain](ts-date-time#retrain) the model. It's a good idea to complete this step so that the model uses the most recent data, but it is not required.</br>

	![](images/time-retrain.png)

2. Prepare and upload your prediction dataset. Either upload a [prediction-ready dataset](#create-a-prediction-ready-dataset) with the required forecast rows for predictions or let DataRobot build you a [prediction file template](#prediction-file-template).

3. Optionally, change the [forecast point](#forecast-point-and-settings)&mdash;the date to begin making predictions from&mdash;from the DataRobot default.

4. [Compute predictions](#compute-and-access-predictions).

### Create a prediction-ready dataset {: #create-a-prediction-ready-dataset }

If you choose to manually create a prediction dataset, use the provided summary to determine the number of historical rows needed. Optionally, open [Forecast Settings](#forecast-settings) to change the forecast point, making sure that the historical row requirements from your new forecast point are met in the prediction dataset. If needed, click **See an example dataset** for a visual representation of the format required for the CSV file.

The following example shows that you would leave the target and non-KA values in rows 7 through 9 (the "Forecast rows") blank; DataRobot fills in those rows with the prediction values when you compute predictions.

![](images/time-predict-2.png)

When your prediction dataset is in the appropriate format, click **Import data from** to select and upload it into DataRobot. Then, [compute predictions](#compute-and-access-predictions).

!!! note
    While KA features can have missing values in the prediction data inside of the forecast window, that configuration may affect prediction accuracy. DataRobot surfaces a warning and also an information message beneath the affected dataset. Also, if you have missing history when picking a forecast point that is later than the default, DataRobot will still allow you to compute predictions.

### Prediction file template {: #prediction-file-template }

If your [forecast point](#forecast-point-and-settings) setting requires additional forecast rows be added to the original prediction dataset, DataRobot automatically generates a template file that appends those needed rows. Use the auto-generated prediction template as-is or [download and make modifications](#modify-the-template). To create the template, click **Import data from** to select and upload the intended dataset. DataRobot generates the template if it does not find at least one row after the default forecast point that does not include a target value (no empty forecast rows) and therefore can be a forecast row.

For example, let's say your forecast window is `+5 ... +6` and the default forecast point is `t0`. Points `t5` and `t6` are missing, but points `t1` and `t` are present. In this case, DataRobot generates the extended file because it found no forecast rows that satisfy `t5` or `t6` after the default forecast point.

For DataRobot to generate a template, the following conditions must be met:

* There are no supported forecast rows (empty target rows that fall within the forecast window).
* The generated template file size is less than the [upload file limit](file-types#time-series-file-sizes).

#### Use the template as-is {: #use-the-template-as-is }

Use the template as-is if you do not need to modify the forecast rows or add any [KA](#known-in-advance) features. DataRobot will set the forecast point and add the full number of rows required to satisfy the project's forecast window configuration.

Use the default auto-expansion if you are using the most recent data as your forecast point, have no gaps, and want the full number of rows. In this case, you can upload the dataset and [compute predictions](#compute-and-access-predictions).

#### Modify the template {: #modify-the-template }

DataRobot generates the prediction file template as soon as you upload a prediction dataset. However, there are cases where you may want to modify that template before computing predictions:

* You have identified a column as a [KA](#known-in-advance) feature and need to enter relevant information in the forecast rows.

* You have multiple series and want to predict on fewer than every series in the dataset. (DataRobot adds the necessary number of rows for each series in the dataset.)

* Based on your settings DataRobot would have generated several additional rows but you want to predict on fewer.

To modify a template:

1. Click [**Forecast Settings**](#forecast-settings) (Forecast Point Predictions tab), expand the **Advanced options** link, and download the auto-generated prediction file template:

	![](images/time-predict-4.png)

2. Open the template and add any required information to the new forecast rows or remove rows you don't need as they will only slow predictions.

3. Save the modified template and upload it back into DataRobot using **Import data from**.

4. Optionally, set the forecast point to something other than the default.

5. [Compute predictions](#compute-and-access-predictions).


## Forecast settings {: #forecast-settings }

DataRobot chooses a default forecast point (1) to base predictions on. The default date is a forecast point that is the most recent valid timestamp that maximizes the usage of time history within the feature derivation window. However, you can change the default to:

* A customized [forecast point](#forecast-point-predictions) that sets a specific date (forecast point) from which you want to begin making predictions.
* A [forecast range](#forecast-range-predictions) that sets a range of forecast distances within a selected date range.

Use the **Forecast Settings** modal (2) to configure a date setting other than the default setting.

![](images/time-predict-3.png)

!!! note
    The default forecast point is either the most recent row in the dataset that contains a valid target value or, if you configured [gaps](ts-customization#understanding-gaps) during project setup, it is the row in the dataset that satisfies the feature derivation window’s history requirements. Note also that you must use the default forecast point for [fractional-second forecasts](#time-series-interval-units).


### Forecast Point Predictions {: #forecast-point-predictions }

Use _Forecast Point Predictions_ to select the specific date (forecast point) from which you want to begin making predictions. You can select any date shown since DataRobot trains models using all potential forecast points. Be sure, if you select a different forecast point, that your dataset has enough history. See the [table](#forecast-settings-defined) for descriptions of each field.

![](images/time-predict-5.png)

### Forecast Range Predictions {: #forecast-range-predictions }

Use _Forecast Range Predictions_ for making predictions on all forecast distances within the selected date range. This option provides bulk predictions on an external dataset, including all forecast distance predictions for all rows in the dataset. Use the results for validating the model, not for making future predictions.

!!! note
    When using range predictions, DataRobot _includes_ the prediction start date and _excludes_ the prediction end date. In other words, the last date in the range is not a forecast point in the prediction output.

Forecast Range Predictions are helpful for validating model accuracy. DataRobot extracts the actual values for all points in time from the dataset. Set the prediction start and end dates to define the historical range of time for which you want bulk predictions. Because this model evaluation process uses actual values, DataRobot only generates predictions for timestamps that can support predictions for every forecast distance. See the [table](#forecast-settings-defined) for descriptions of each field.

![](images/time-predict-12.png)

### Forecast settings definitions {: #forecast-settings-definitions }

The following table describes the forecast point and forecast range configuration fields:

|  |   Element   |   Description  |
|  | -------------|----------------|
| ![](images/icon-1.png)| Prediction type selector | Selects either forecast point (specific start date) or forecast range ([bulk predictions](#forecast-range-predictions)).|
| ![](images/icon-2.png)| Advanced options | Expands to download the [prediction file template](#prediction-file-template) (if created).|
| ![](images/icon-3.png)| Row summary <br /> (forecast point)| Provides the same summary information as that on the **Make Predictions** tab. Colors correspond to the visualization above (6), showing the historical and forecast rows set during original project creation.    |
| ![](images/icon-3.png)| Row summary  <br /> (forecast range) | A legend indicating the meaning of the line (5) above.   |
| ![](images/icon-4.png)| Valid forecast options | Indicates, in the context of the date span for the entire dataset (5), the range of dates that are valid forecast settings (dates that will produce valid predictions). While the dotted colored bar above the full range indicates possible valid options, dates within the yellow range are those that extend beyond DataRobot's suggested settings because they have missing history or KA features. Also, if there are gaps inside this range, the predictions may still fail (due to insufficient time history or no forecast row).|
| ![](images/icon-5.png)| Dataset start and end | Within the context of the full range of dates (historical rows) found in the dataset, indicates the range of points you are choosing to forecast. In cases where DataRobot created a [prediction file template](#prediction-file-template), the dataset end date and template file end date are both represented. If the dataset end and max forecast distance are the same, the display does not show the dataset end. <br /> For forecast point settings, the historical and forecast rows summarized above (3) are also overlaid on the span. The overlay moves as the forecast point setting changes.|
| ![](images/icon-6.png)| Historical and forecast zoom | A zoomed view of the relevant historical rows and forecast rows, intended to simplify selecting a forecast point. As you move the sliders or set a calendar date, the date line above (5), reflects the change. |
| ![](images/icon-7.png)| Date selector | A calendar picker for setting the forecast point or forecast range (start and end dates). Invalid dates&mdash;those not indicated in the valid forecast range (4)&mdash;are disabled in the calendar. |
| ![](images/icon-8.png)| Compute Predictions | Initiate prediction computation (same as **Compute Predictions** on the **Make Predictions** page). Or, save the settings and close the modal without computing predictions. New settings are reflected on the **Make Predictions** page, and clicking **Compute Predictions** from there at any future time will use these settings. Alternatively, click the **X** to close without saving changes.|


### Understand dates in forecast settings {: #understand-dates-in-forecast-settings }

When you upload a prediction dataset, DataRobot detects the range of dates (the <em>valid forecast range</em>) available for use as the forecast point. It also determines a default forecast point, which is the latest timestamp available for making predictions with full history.

The following timestamps are marked in the visualization:

* <em>Data start</em> is the timestamp of the first row detected in the dataset.
* <em>Data end</em> is the timestamp of the last row detected in the dataset, whether it is the original or the auto-generated template.
* <em>Max forecast distance</em> is the timestamp of the last possible forecast distance in the dataset.

Before modifying the forecast point, review the basic [time series modeling framework](ts-framework).

![](images/framework-1.png)

Some things to consider:

- What is the most recent valid forecast point? The most recent valid forecast point is the maximum forecast point that can be used to run predictions without error. It may differ from the default forecast point because the default forecast point takes the time history usage into consideration.

- Based on the forecast window, what is the timestamp of the last prediction that was output? The forecast window is defined relative to the forecast point; the last prediction timestamp is a function of both the forecast window and the timestamp inside the prediction dataset.

	For example, consider a forecast window from 1 to 7 days. The forecast point is 2001-01-01, but the max date in the dataset is 2001-01-05. In this case, the max forecast timestamp is 2001-01-05 as there are no rows from 2001-01-06 to 2001-01-08.

- Consider the length of your forecast window. That is, after the final row with actual values, do you have at least one forecast row (within the boundaries of the forecast window)? If you do, DataRobot will not generate a template; if you do not, DataRobot will generate forecast rows based on the project configuration.

Use the **Forecast settings** modal to get an overview of the prediction dataset, which aids in choosing settings like the forecast point and prediction start and end dates. In addition, DataRobot generates forecast rows after the final row with actual values (if there are no forecast rows based on the default forecast point), simplifying the prediction workflow. The actual values are the data taken from the last row of each and every series ID and duplicated to the forecast rows.

??? tip "Time series prediction dataset validation"
	DataRobot validates a time series prediction dataset once it is uploaded, checking whether there are sufficient historical rows to produce the engineered features required by the project.

	 If seasonality is detected in the project, additional historical rows&mdash;longer than the feature derivation window (FDW)&mdash;are required. For example, a project with an FDW of [-14, 0] and 7-day seasonality will require 21 historical days in the prediction dataset to accommodate target differenced features (such as `target (7 day diff) (mean)`) and differencing features (such as `target (14 day max) (diff 7 day mean)`). If multiple seasonalities are detected, the longest seasonality is used to perform the validation check.

	DataRobot does not require the presence of all historical rows when computing window statistics features (for example, `target (7 day mean)` or `feature (14 day max)`). Depending on the FDW settings, DataRobot predetermines the minimum required historical rows for predictions. If there are too many missing historical rows in the prediction dataset, predictions will error.

	If a multiplicative trend is detected, DataRobot requires all historical target values in the prediction dataset to be strictly positive (> 0). Zero or negative target value(s) violate the model assumption that the dataset is multiplicative and the prediction generates an error. To correct it, check whether the training dataset is representative of the use case during prediction time or disable the advanced option [**Treat as exponential trend**](ts-adv-opt#treat-as-exponential-trend) and recreate the project.


### Compute and access predictions {: #compute-and-access-predictions }

When the forecast point is set and the dataset is in the correct format and successfully uploaded, it's time to compute predictions.

1. There are two methods for computing predictions. Click either:

	* the **Compute Predictions** button on the **Forecast Settings** modal.
	* the **Compute Predictions** link (next to the **Forecast Settings** link) on the **Make Predictions** page.

2. When processing completes, [preview](#prediction-preview) the historical data and predictions from the dataset or download a CSV of your predictions. To download, click **Download** to access predictions:

	![](images/dnt-time-predict-4.png)

!!! note
    Notes on prediction output:
    <br>&bull; Depending on your permissions, you may see the column, "Original Format Timestamp". This provides the same values provided by the "Timestamp" column but uses the timestamp format from the original prediction dataset. Your administrator can enable this permission for you.
    <br> &bull; When working with downloaded predictions, be aware that in time series projects, <code>row_id</code> does not represent the row position from the original project data (for training predictions) or uploaded prediction data for a given timestamp and/or <code>series_id</code>. Instead it is a derived value specific to the project.

With some spreadsheet software you could go on to graph your prediction output. For example, the sample data shows predicted sales for the next day through the next 7 days, which can then be acted on for inventory and staffing decisions.

![](images/dnt-time-predict-5.png)

### Prediction preview {: #prediction-preview }

After you have computed predictions, click the **Preview** link to display a plot of the predictions over time, in the context of the historical data. This plot shows the prediction for each [forecast distance](#detailed-workflow) at once, relative to a single forecast point.

![](images/time-predict-6.png)

By default, the prediction interval (shaded in blue) represents the area in which 80% of predictions fall. The intervals estimate the range of values DataRobot expects actual values of the target to fall within. They are similar to a prediction's confidence interval, but are instead based on the residual errors measured during the model's backtesting.

For charts meeting the following criteria, the chart displays an estimated prediction interval:

* All backtests must be trained. In this way, DataRobot can use all available validation rows and prevent different interval values based on the available information.

* There must be at least 10 data points per forecast distance value.

If the above criteria are not met, DataRobot displays only the prediction values (orange points).

You can specify a prediction interval size, which specifies the desired probability of actual values falling within the interval range. Larger values are less precise, but more conservative. For example, the default value of 80% results in a lower bound of 10% and an upper bound of 90%. To change the predictions interval, click the **Options** link and DataRobot recalculates the display:

![](images/time-predict-11.png)

!!! note
    You can also set the prediction interval when [making predictions](deploy-model).

Prediction intervals are estimated based on the quantiles of the out-of-sample residuals and as a result may not be symmetrical. DataRobot calculates, independently, per series (if applicable) and per forecast distance, so intervals may increase with distance, and/or have a range specific to each series. If you predict on a new series, or a series in which there was no overlap with validation, DataRobot uses the average across all series.

Hover over a point in the preview graph, left of the forecast point, to display the value from the historical data:

![](images/time-predict-8.png)

Or to the right of the forecast point to view the forecast (prediction):

![](images/time-predict-9.png)

When used with multiseries modeling, you have an option to select which series to preview. This overview indicates how the target, feature, or accuracy changes over time for an individual series and provides a forecast for that series. From the dropdown, select a series. Or, page through the series options using the left and right arrows. By comparing the prediction intervals for each series, you can better identify the series with that provide the most accurate predictions.

![](images/time-predict-10.png)


Note that you can also download predictions from within the preview plot.
