Using Related Time Series Datasets
A related time series dataset includes timeseries data that isn't included in a target time series dataset and might improve the accuracy of your predictor.
For example, in the demand forecasting domain, a target time series dataset would contain
timestamp
and item_id
dimensions, while a complementary related time
series dataset also includes the following supplementary features: item price
,
promotion
, and weather
.
A related time series dataset can contain up to 10 forecast dimensions (the same ones in your target time series dataset) and up to 13 related timeseries features.
Python notebooks
For a stepbystep guide on using related timeseries datasets, see Incorporating Related Time Series
Topics
Historical and Forwardlooking Related Time Series
Note
A related time series that contains any values within the forecast horizon is treated as a forwardlooking time series.
Related time series come in two forms:

Historical time series: time series without data points within the forecast horizon.

Forwardlooking time series: time series with data points within the forecast horizon.
Historical related time series contain data points up to the forecast horizon, and do not contain any data points within the forecast horizon. Forwardlooking related time series contain data points up to and within the forecast horizon.
Related Time Series Dataset Validation
A related time series dataset has the following restrictions:

It can't include the target value from the target time series.

It must include
item_id
andtimestamp
dimensions, and at least one related feature (such asprice
). 
Related time series feature data must be of the
int
orfloat
datatypes. 
In order to use the entire target time series, all items from the target time series dataset must also be included in the related time series dataset. If a related time series only contains a subset of items from the target time series, then the model creation and forecast generation will be limited to that specific subset of items.
For example, if the target time series contains 1000 items and the related time series dataset only contains 100 items, then the model and forecasts will be based on only those 100 items.

The frequency at which data is recorded in the related time series dataset must match the interval at which you want to generate forecasts (the forecasting granularity).
For example, if you want to generate forecasts at a weekly granularity, the frequency at which data is recorded in the related time series must also be weekly, even if the frequency at which data is recorded in the target time series is daily.

The data for each item in the related time series dataset must start on or before the beginning
timestamp
of the correspondingitem_id
in the target time series dataset.For example, if the target time series data for
socks
starts at 20190101 and the target time series data forshoes
starts at 20190201, the related time series data forsocks
must begin on or before 20190101 and the data forshoes
must begin on or before 20190201. 
For forwardlooking related time series datasets, the last timestamp for every item must be on the last timestamp in the userdesignated forecast window (called the forecast horizon).
In the example related time series file below, the
timestamp
data for both socks and shoes must end on or after 20190701 (the last recorded timestamp) plus the forecast horizon. If data frequency in the target time series is daily and the forecast horizon is 10 days, daily data points must be provided in the forwardlooking related time series file until 20190711. 
For historical related time series datasets, the last timestamp for every item must match the last timestamp in the target time series.
In the example related time series file below, the
timestamp
data for both socks and shoes must end on 20190701 (the last recorded timestamp). 
The Forecast dimensions provided in the related time series dataset must be either equal to or a subset of the dimensions designated in the target time series dataset.

Related time series cannot have missing values. For information on missing values in a related time series dataset, see Handling Missing Values.
Example: Forwardlooking Related Time Series File
The following table shows a correctly configured related time series dataset file. For this example, assume the following:

The last data point was recorded in the target time series dataset on 20190701.

The forecast horizon is 10 days.

The forecast granularity is daily (
D
).
A "…
" row indicates all of the data points in between the previous and
succeeding rows.
timestamp 
item_id 
store 
price 

20190101  socks  NYC  10 
20190102  socks  NYC  10 
20190103  socks  NYC  15 
... 

20190601  socks  NYC  10 
... 

20190701  socks  NYC  10 
... 

20190711  socks  NYC  20 
20190105  socks  SFO  45 
... 

20190605  socks  SFO  10 
... 

20190701  socks  SFO  10 
... 

20190711  socks  SFO  30 
20190201  shoes  ORD  50 
... 

20190701  shoes  ORD  75 
... 

20190711  shoes  ORD  60 
Example: Forecasting Granularity
The following table shows compatible data recording frequencies for target time series and related time series to forecast at a weekly granularity. Because data in a related time series dataset can't be aggregated, Forecast accepts only a related time series data frequency that is the same as the chosen forecasting granularity.
Target Input Data Frequency  Related Time Series Frequency  Forecasting Granularity  Supported by Forecast? 

Daily  Weekly  Weekly  Yes 
Weekly  Weekly  Weekly  Yes 
N/A  Weekly  Weekly  Yes 
Daily  Daily  Weekly  No 
Legacy Predictors and Related Time Series
Note
To upgrade an existing predictor to AutoPredictor, see Upgrading to AutoPredictor
When using a legacy predictor, you can use a related time series dataset when training a predictor with the CNNQR, DeepAR+, and Prophet algorithms. NPTS, ARIMA, and ETS do not accept related time series data.
The following table shows the types of related time series each Amazon Forecast algorithm accepts.
CNNQR  DeepAR+  Prophet  NPTS  ARIMA  ETS  

Historical related time series 

Forwardlooking related time series 
When using AutoML, you can provide both historical and forwardlooking related time series data, and Forecast will only use those time series where applicable.
If you provide forwardlooking related time series data, Forecast will use the related data with CNNQR, DeepAR+, and Prophet, and will not use the related data with NPTS, ARIMA and ETS. If provided historical related time series data, Forecast will use the related data with CNNQR, and will not use the related data with DeepAR+, Prophet, NPTS, ARIMA, and ETS.