

 Amazon Forecast is no longer available to new customers. Existing customers of Amazon Forecast can continue to use the service as normal. [Learn more"](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/)

# Predefined Dataset Domains and Dataset Types
<a name="howitworks-domains-ds-types"></a>

To train a predictor, you create one or more datasets, add them to a dataset group, and provide the dataset group for training.

For each dataset that you create, you associate a dataset domain and a dataset type. A *dataset domain* specifies a pre-defined dataset schema for a common use case, and does not impact model algorithms or hyperparameters.

Amazon Forecast supports the following dataset domains:
+ [RETAIL Domain](retail-domain.md) – For retail demand forecasting
+ [INVENTORY\$1PLANNING Domain](inv-planning-domain.md) – For supply chain and inventory planning
+ [EC2 CAPACITY Domain](ec2-capacity-domain.md) – For forecasting Amazon Elastic Compute Cloud (Amazon EC2) capacity 
+ [WORK\$1FORCE Domain](workforce-domain.md) – For work force planning 
+ [WEB\$1TRAFFIC Domain](webtraffic-domain.md) – For estimating future web traffic 
+ [METRICS Domain](metrics-domain.md) – For forecasting metrics, such as revenue and cash flow
+ [CUSTOM Domain](custom-domain.md) – For all other types of time-series forecasting

Each domain can have one to three *dataset types*. The dataset types that you create for a domain are based on the type of data that you have and what you want to include in training.

Each domain requires a target time series dataset, and optionally supports the related time series and item metadata dataset types.

The dataset types are:
+ Target time series – The only required dataset type. This type defines the *target* field that you want to generate forecasts for. For example, if you want to forecast the sales for a set of products, then you must create a dataset of historical time-series data for each of the products that you want to forecast. Similarly, you can create a target time series dataset for metrics— such as revenue, cash flow, and sales—that you might want to forecast.
+ Related time series – Time-series data that is related to the target time series data. For example, price is related to product sales data, so you might provide it as a related time series.
+ Item metadata – Metadata that is applicable to the target time-series data. For example, if you are forecasting sales for a particular product, attributes of the product—such as brand, color, and genre—will be part of item metadata. When predicting EC2 capacity for EC2 instances, metadata might include the CPU and memory of the instance types.

For each dataset type, your input data must contain certain required fields. You can also include optional fields that Amazon Forecast suggests that you include.

The following examples show how to choose a dataset domain and corresponding dataset types.

**Example 1: Dataset Types in the RETAIL Domain**  
If you are a retailer interested in forecasting demand for items, you might create the following datasets in the RETAIL domain:  
+ Target time series is the required dataset of historical time-series demand (sales) data for each item (each product a retailer sells). In the RETAIL domain, this dataset type requires that the dataset includes the `item_id`, `timestamp`, and the `demand` fields. The `demand` field is the forecast target, and is typically the number of items sold by the retailer in a particular week or day.
+ Optionally, a dataset of the related time series type. In the RETAIL domain, this type can include optional, but suggested, time-series information such as `price`, `inventory_onhand`, and `webpage_hits`.
+ Optionally, a dataset of the item metadata type. In the RETAIL domain, Amazon Forecast suggests providing metadata information related to the items that you provided in target time series, such as `brand`, `color`, `category`, and `genre`.

**Example 2: Dataset Types in the METRICS Domain**  
If you want to forecast key metrics for your organization—such as revenue, sales and cash flow—you can provide Amazon Forecast with the following datasets:  
+ The target time series dataset that provides historical time-series data for the metric that you want to forecast. If your interest is to forecast the revenue of all of the business units in your organization, you can create a `target time series` dataset with the `metric`, `business unit`, and `metric_value` fields.
+ If you have any metadata for each metric that isn't required, such as `category` or `location`, you might provide datasets of the related time series and item metadata type.
At a minimum, you must provide a target time series dataset for Forecast to generate forecasts for your target metrics.

**Example 3: Dataset Types in the CUSTOM Domain**  
The training data for your forecasting application might not fit into any of the Amazon Forecast domains. If that's the case, choose the CUSTOM domain. You must provide the target time series dataset, but you can add your own custom fields.  
The [Getting Started](getting-started.md) exercise forecasts electricity usage for a client. The electricity usage training data doesn't fit into any of the dataset domains, so we used the CUSTOM domain. In the exercise, we use only one dataset type, the target time series type. We map the data fields to the minimum fields required by the dataset type.

# RETAIL Domain
<a name="retail-domain"></a>

The RETAIL domain supports the following dataset types. For each dataset type, we list required and optional fields. For information on how to map the fields to columns in your training data, see [Dataset Domains and Dataset Types](howitworks-datasets-groups.md#howitworks-dataset-domainstypes).

**Topics**
+ [Target Time Series Dataset Type](#target-time-series-type-retail-domain)
+ [Related Time Series Dataset Type](#related-time-series-type-retail-domain)
+ [Item Metadata Dataset Type](#item-metadata-type-retail-domain)

## Target Time Series Dataset Type
<a name="target-time-series-type-retail-domain"></a>

The target time series is the historical time series data for each item or product sold by the retail organization. The following fields are required: 
+ `item_id ` (string) – A unique identifier for the item or product that you want to predict the demand for.
+ `timestamp` (timestamp)
+ `demand` (float) – The number of sales for that item at the timestamp. This is also the *target* field for which Amazon Forecast generates a forecast.

The following dimension is optional and can be used to change forecasting granularity:
+ `location` (string) – The location of the store that the item got sold at. This should only be used if you have multiple stores/locations.

Ideally, only these required fields and optional dimensions should be included. Other additional time series information should be included in a related time series dataset.

## Related Time Series Dataset Type
<a name="related-time-series-type-retail-domain"></a>

You can provide Amazon Forecast with related time series datasets, such as the price or the number of web hits the item received on a particular date. The more information that you provide, the more accurate the forecast. The following fields are required: 
+ `item_id ` (string)
+ `timestamp `(timestamp)

The following fields are optional and might be useful in improving forecast results:
+ `price` (float) – The price of the item at the time of the timestamp.
+ `promotion_applied` (integer; 1=true, 0=false) – A flag that specifies whether there was a marketing promotion for that item at the timestamp.

In addition to the required and suggested optional fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

## Item Metadata Dataset Type
<a name="item-metadata-type-retail-domain"></a>

This dataset provides Amazon Forecast with information about metadata (attributes) of the items whose demand is being forecast. The following fields are required:
+ `item_id `(string)

The following fields are optional and might be useful in improving forecast results:
+ `category` (string)
+ `brand` (string)
+ `color` (string)
+ `genre` (string)

In addition to the required and suggested optional fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

# CUSTOM Domain
<a name="custom-domain"></a>

The CUSTOM domain supports the following dataset types. For each dataset type, we list required and optional fields. For information on how to map the fields to columns in your training data, see [Dataset Domains and Dataset Types](howitworks-datasets-groups.md#howitworks-dataset-domainstypes).

**Topics**
+ [Target Time Series Dataset Type](#target-time-series-type-custom-domain)
+ [Related Time Series Dataset Type](#related-time-series-type-custom-domain)
+ [Item Metadata Dataset Type](#item-metadata-type-custom-domain)

## Target Time Series Dataset Type
<a name="target-time-series-type-custom-domain"></a>

The following fields are required:
+ `item_id ` (string)
+ `timestamp` (timestamp)
+ `target_value` (floating-point integer) – This is the `target` field for which Amazon Forecast generates a forecast.

Ideally, only these required fields should be included. Other additional time series information should be included in a related time series dataset.

## Related Time Series Dataset Type
<a name="related-time-series-type-custom-domain"></a>

The following fields are required:
+ `item_id` (string)
+ `timestamp` (timestamp)

In addition to the required fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

## Item Metadata Dataset Type
<a name="item-metadata-type-custom-domain"></a>

The following field is required:
+ `item_id` (string)

The following field is optional and might be useful in improving forecast results:
+ `category` (string)

In addition to the required and suggested optional fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

# INVENTORY\$1PLANNING Domain
<a name="inv-planning-domain"></a>

Use the INVENTORY\$1PLANNING domain for forecasting demand for raw materials and determining how much inventory of a particular item to stock. It supports the following dataset types. For each dataset type, we list required and optional fields. For information on how to map the fields to columns in your training data, see [Dataset Domains and Dataset Types](howitworks-datasets-groups.md#howitworks-dataset-domainstypes).

**Topics**
+ [Target Time Series Dataset Type](#target-time-series-type-inv-planning-domain)
+ [Related Time Series Dataset Type](#related-time-series-type-related-time-series-domain)
+ [Item Metadata Dataset Type](#item-metadata-type-related-time-series-domain)

## Target Time Series Dataset Type
<a name="target-time-series-type-inv-planning-domain"></a>

The following fields are required: 
+ `item_id` (string)
+ `timestamp` (timestamp)
+ `demand` (float) – This is the `target` field for which Amazon Forecast generates a forecast.

The following dimension is optional and can be used to change forecasting granularity:
+ `location` (string) – The location of the distribution center where the item is stocked. This should only be used if you have multiple stores/locations.

Ideally, only these required fields and optional dimensions should be included. Other additional time series information should be included in a related time series dataset.

## Related Time Series Dataset Type
<a name="related-time-series-type-related-time-series-domain"></a>

The following fields are required: 
+ `item_id` (string)
+ `timestamp` (timestamp)

The following fields are optional and might be useful in improving forecast results:
+ `price` (float) – The price of the item 

In addition to the required and suggested optional fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

## Item Metadata Dataset Type
<a name="item-metadata-type-related-time-series-domain"></a>

The following fields are required: 
+ `item_id` (string)

The following fields are optional and might be useful in improving forecast results:
+ `category` (string) – The category of the item.
+ `brand` (string) – The brand of the item.
+ `lead_time` (string) – The lead time, in days, to manufacture the item.
+ `order_cycle` (string) – The order cycle starts when work begins and ends when the item is ready for delivery.
+ `safety_stock` (string) – The minimum amount of stock to keep on hand for that item.

In addition to the required and suggested optional fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

# EC2 CAPACITY Domain
<a name="ec2-capacity-domain"></a>

Use the EC2 CAPACITY domain for forecasting Amazon EC2 capacity. It supports the following dataset types. For each dataset type, we list required and optional fields. For information on how to map the fields to columns in your training data, see [Dataset Domains and Dataset Types](howitworks-datasets-groups.md#howitworks-dataset-domainstypes).

## Target Time Series Dataset Type
<a name="target-time-series-type-ec2-capacity-domain"></a>

The following fields are required:
+ `instance_type` (string) – The type of instance (for example, c5.xlarge).
+ `timestamp` (timestamp)
+ `number_of_instances` (integer) – The number of instances of that particular instance type that was consumed at the timestamp. This is the `target` field for which Amazon Forecast generates a forecast.

The following dimension is optional and can be used to change forecasting granularity:
+ `location` (string) – You can provide an AWS Region, such as us-west-2 or us-east-1. This should only be used if you're modeling multiple Regions.

Ideally, only these required and suggested optional fields should be included. Other additional time series information should be included in a related time series dataset.

## Related Time Series Dataset Type
<a name="related-time-series-type-ec2-capacity-domain"></a>

The following fields are required: 
+ `instance_type` (string)
+ `timestamp` (timestamp)

In addition to the required fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

# WORK\$1FORCE Domain
<a name="workforce-domain"></a>

Use the WORK\$1FORCE domain to forecast workforce demand. It supports the following dataset types. For each dataset type, we list required and optional fields. For information on how to map the fields to columns in your training data, see [Dataset Domains and Dataset Types](howitworks-datasets-groups.md#howitworks-dataset-domainstypes).

**Topics**
+ [Target Time Series Dataset Type](#target-time-series-type-workforce-domain)
+ [Related Time Series Dataset Type](#related-time-series-type-workforce-domain)
+ [Item Metadata Dataset Type](#item-metadata-type-workforce-domain)

## Target Time Series Dataset Type
<a name="target-time-series-type-workforce-domain"></a>

The following fields are required: 
+ `workforce_type` (string) – The type of work force labor being forecast. For example, call center demand or fulfillment center labor demand.
+ `timestamp` (timestamp)
+ `workforce_demand` (floating-point integer) – This is the `target` field for which Amazon Forecast generates a forecast.

The following dimension is optional and can be used to change forecasting granularity:
+ `location` (string) – The location where the work force resources are sought. This should be used if you have multiple stores/locations.

Ideally, only these required fields and optional dimensions should be included. Other additional time series information should be included in a related time series dataset.

## Related Time Series Dataset Type
<a name="related-time-series-type-workforce-domain"></a>

The following fields are required: 
+ `workforce_type` (string)
+ `timestamp` (timestamp)

In addition to the required fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

## Item Metadata Dataset Type
<a name="item-metadata-type-workforce-domain"></a>

The following field is required: 
+ `workforce_type` (string)

The following fields are optional and might be useful in improving forecast results:
+ `wages` (float) – The average wages for that particular workforce type.
+ `shift_length` (string) – The length of the shift.
+ `location` (string) – The location of the workforce.

In addition to the required and suggested optional fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

# WEB\$1TRAFFIC Domain
<a name="webtraffic-domain"></a>

Use the WEB\$1TRAFFIC domain to forecast web traffic to a web property or a set of web properties. It supports the following dataset types. The relevant topics describe required and optional fields the dataset type supports. For information about how to map these fields to columns in your training data see [Dataset Domains and Dataset Types](howitworks-datasets-groups.md#howitworks-dataset-domainstypes).

**Topics**
+ [Target Time Series Dataset Type](#target-time-series-type-webtraffic-domain)
+ [Related Time Series Dataset Type](#related-time-series-type-webtraffic-domain)

## Target Time Series Dataset Type
<a name="target-time-series-type-webtraffic-domain"></a>

The following fields are required: 
+ `item_id` (string) – A unique identifier for each web property being forecast.
+ `timestamp` (timestamp)
+ `value` (float) – This is the `target` field for which Amazon Forecast generates a forecast.

Ideally, only these required fields should be included. Other additional time series information should be included in a related time series dataset.

## Related Time Series Dataset Type
<a name="related-time-series-type-webtraffic-domain"></a>

The following fields are required: 
+ `item_id` (string)
+ `timestamp` (timestamp)

In addition to the required fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

### Item Metadata Dataset Type
<a name="idem-metadata-type-webtraffic-domain"></a>

The following field is required: 
+ `item_id` (string)

The following field is optional and might be useful in improving forecast results:
+ `category` (string)

In addition to the required and suggested optional fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

# METRICS Domain
<a name="metrics-domain"></a>

Use the METRICS domain for forecasting metrics, such as revenue, sales, and cash flow. It supports the following dataset types. For each dataset type, we list required and optional fields. For information on how to map the fields to columns in your training data, see [Dataset Domains and Dataset Types](howitworks-datasets-groups.md#howitworks-dataset-domainstypes).

**Topics**
+ [Target Time Series Dataset Type](#target-time-series-type-metrics-domain)
+ [Related Time Series Dataset Type](#related-time-series-type-metrics-domain)
+ [Item Metadata Dataset Type](#item-metadata-type-metrics-domain)

## Target Time Series Dataset Type
<a name="target-time-series-type-metrics-domain"></a>

The following fields are required: 
+ `metric_name` (string)
+ `timestamp` (timestamp)
+ `metric_value` (floating-point integer) – This is the `target` field for which Amazon Forecast generates a forecast (for example, the amount of revenue generated on a particular day).

Ideally, only these required fields should be included. Other additional time series information should be included in a related time series dataset.

## Related Time Series Dataset Type
<a name="related-time-series-type-metrics-domain"></a>

The following fields are required: 
+ `metric_name` (string)
+ `timestamp` (timestamp)

In addition to the required fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.

## Item Metadata Dataset Type
<a name="item-metadata-type-metrics-domain"></a>

The following field is required: 
+ `metric_name` (string)

The following field is optional and might be useful in improving forecast results:
+ `category` (string)

In addition to the required and suggested optional fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.