Amazon Forecast
Developer Guide

This is prerelease documentation for a service in preview release. It is subject to change.

Getting Started

To get started using Amazon Forecast, you do the following.

  • Create an Amazon Forecast dataset and import training data.

  • Create an Amazon Forecast predictor. The algorithm, in the recipe that you choose, trains a predictor using the datasets. You specify both the recipe and dataset when you create the predictor.

  • Deploy the predictor. Amazon Forecast uses the predictor to run inference and generate a forecast.

In this exercise, you use a modified version of a publicly available electricity usage dataset to train predictors. For more information, see ElectricityLoadDiagrams20112014 Data Set. The following are sample rows from the dataset:

2014-01-01 01:00:00, 2.53807106598985, client_0 2014-01-01 01:00:00, 23.648648648648624, client_1 2014-01-01 02:00:00, 9.648648648612345, client_0

For this exercise, you use the dataset to train a predictor, and then predict the hourly electricity usage by client.

You can use either the Amazon Forecast console or the AWS Command Line Interface (AWS CLI) for this exercise.

Important

Before you begin, make sure that you have an AWS account and have installed the AWS CLI. For more information, see Setting Up. We also recommend that you review How Amazon Forecast Works.

Prepare Input Data

Regardless of whether you use the Amazon Forecast console or the AWS Command Line Interface (AWS CLI) to set up a forecasting project, you need to set up your input data. To prepare your data, you do the following:

  • Download training data to your computer and upload it to an Amazon Simple Storage Service (Amazon S3) bucket in your AWS account. To import your data to an Amazon Forecast dataset, you must store it in an S3 bucket.

  • Create an AWS Identity and Access Management (IAM) role. You give Amazon Forecast permission to access your S3 bucket with the IAM role. For more information about IAM roles, see IAM Roles in the IAM User Guide.

To prepare training data

  1. Download the zip file, electricityusagedata.zip.

    For this exercise, you use the individual household electric power consumption dataset. (Dua, D. and Karra Taniskidou, E. (2017). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.) We aggregate the usage data hourly.

  2. Unzip the content and save it locally as electricityusagedata.csv.

  3. Upload the data file to an S3 bucket.

    For step-by-step instructions, see Uploading Files and Folders by Using Drag and Drop in the Amazon Simple Storage Service Console User Guide.

  4. Create an IAM role.

    If you want to use the AWS CLI for the Getting Started exercise, you must create an IAM role. If you use the console, you can have it create the role for you. For step-by-step instructions, see Set Up Permissions for Amazon Forecast.

Now, use the Amazon Forecast console or the AWS CLI to train a predictor, generate a forecast, and see the forecast.

On this page: