Note:

You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . forecast ]

create-auto-predictor

Description

Creates an Amazon Forecast predictor.

Amazon Forecast creates predictors with AutoPredictor, which involves applying the optimal combination of algorithms to each time series in your datasets. You can use CreateAutoPredictor to create new predictors or upgrade/retrain existing predictors.

Creating new predictors

The following parameters are required when creating a new predictor:

  • PredictorName - A unique name for the predictor.
  • DatasetGroupArn - The ARN of the dataset group used to train the predictor.
  • ForecastFrequency - The granularity of your forecasts (hourly, daily, weekly, etc).
  • ForecastHorizon - The number of time-steps that the model predicts. The forecast horizon is also called the prediction length.

When creating a new predictor, do not specify a value for ReferencePredictorArn .

Upgrading and retraining predictors

The following parameters are required when retraining or upgrading a predictor:

  • PredictorName - A unique name for the predictor.
  • ReferencePredictorArn - The ARN of the predictor to retrain or upgrade.

When upgrading or retraining a predictor, only specify values for the ReferencePredictorArn and PredictorName .

See also: AWS API Documentation

Synopsis

  create-auto-predictor
--predictor-name <value>
[--forecast-horizon <value>]
[--forecast-types <value>]
[--forecast-dimensions <value>]
[--forecast-frequency <value>]
[--data-config <value>]
[--encryption-config <value>]
[--reference-predictor-arn <value>]
[--optimization-metric <value>]
[--explain-predictor | --no-explain-predictor]
[--tags <value>]
[--monitor-config <value>]
[--time-alignment-boundary <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]

Options

--predictor-name (string)

A unique name for the predictor

--forecast-horizon (integer)

The number of time-steps that the model predicts. The forecast horizon is also called the prediction length.

The maximum forecast horizon is the lesser of 500 time-steps or 1/4 of the TARGET_TIME_SERIES dataset length. If you are retraining an existing AutoPredictor, then the maximum forecast horizon is the lesser of 500 time-steps or 1/3 of the TARGET_TIME_SERIES dataset length.

If you are upgrading to an AutoPredictor or retraining an existing AutoPredictor, you cannot update the forecast horizon parameter. You can meet this requirement by providing longer time-series in the dataset.

--forecast-types (list)

The forecast types used to train a predictor. You can specify up to five forecast types. Forecast types can be quantiles from 0.01 to 0.99, by increments of 0.01 or higher. You can also specify the mean forecast with mean .

(string)

Syntax:

"string" "string" ...

--forecast-dimensions (list)

An array of dimension (field) names that specify how to group the generated forecast.

For example, if you are generating forecasts for item sales across all your stores, and your dataset contains a store_id field, you would specify store_id as a dimension to group sales forecasts for each store.

(string)

Syntax:

"string" "string" ...

--forecast-frequency (string)

The frequency of predictions in a forecast.

Valid intervals are an integer followed by Y (Year), M (Month), W (Week), D (Day), H (Hour), and min (Minute). For example, "1D" indicates every day and "15min" indicates every 15 minutes. You cannot specify a value that would overlap with the next larger frequency. That means, for example, you cannot specify a frequency of 60 minutes, because that is equivalent to 1 hour. The valid values for each frequency are the following:

  • Minute - 1-59
  • Hour - 1-23
  • Day - 1-6
  • Week - 1-4
  • Month - 1-11
  • Year - 1

Thus, if you want every other week forecasts, specify "2W". Or, if you want quarterly forecasts, you specify "3M".

The frequency must be greater than or equal to the TARGET_TIME_SERIES dataset frequency.

When a RELATED_TIME_SERIES dataset is provided, the frequency must be equal to the RELATED_TIME_SERIES dataset frequency.

--data-config (structure)

The data configuration for your dataset group and any additional datasets.

DatasetGroupArn -> (string)

The ARN of the dataset group used to train the predictor.

AttributeConfigs -> (list)

Aggregation and filling options for attributes in your dataset group.

(structure)

Provides information about the method used to transform attributes.

The following is an example using the RETAIL domain:

{

"AttributeName": "demand",

"Transformations": {"aggregation": "sum", "middlefill": "zero", "backfill": "zero"}

}

AttributeName -> (string)

The name of the attribute as specified in the schema. Amazon Forecast supports the target field of the target time series and the related time series datasets. For example, for the RETAIL domain, the target is demand .

Transformations -> (map)

The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to override the default values. Related Time Series attributes do not accept aggregation parameters.

The following list shows the parameters and their valid values for the "filling" featurization method for a Target Time Series dataset. Default values are bolded.

  • aggregation : sum , avg , first , min , max
  • frontfill : none
  • middlefill : zero , nan (not a number), value , median , mean , min , max
  • backfill : zero , nan , value , median , mean , min , max

The following list shows the parameters and their valid values for a Related Time Series featurization method (there are no defaults):

  • middlefill : zero , value , median , mean , min , max
  • backfill : zero , value , median , mean , min , max
  • futurefill : zero , value , median , mean , min , max

To set a filling method to a specific value, set the fill parameter to value and define the value in a corresponding _value parameter. For example, to set backfilling to a value of 2, include the following: "backfill": "value" and "backfill_value":"2" .

key -> (string)

value -> (string)

AdditionalDatasets -> (list)

Additional built-in datasets like Holidays and the Weather Index.

(structure)

Describes an additional dataset. This object is part of the DataConfig object. Forecast supports the Weather Index and Holidays additional datasets.

Weather Index

The Amazon Forecast Weather Index is a built-in dataset that incorporates historical and projected weather information into your model. The Weather Index supplements your datasets with over two years of historical weather data and up to 14 days of projected weather data. For more information, see Amazon Forecast Weather Index .

Holidays

Holidays is a built-in dataset that incorporates national holiday information into your model. It provides native support for the holiday calendars of 66 countries. To view the holiday calendars, refer to the Jollyday library. For more information, see Holidays Featurization .

Name -> (string)

The name of the additional dataset. Valid names: "holiday" and "weather" .

Configuration -> (map)

Weather Index

To enable the Weather Index, do not specify a value for Configuration .

Holidays

Holidays

To enable Holidays, set CountryCode to one of the following two-letter country codes:

  • "AL" - ALBANIA
  • "AR" - ARGENTINA
  • "AT" - AUSTRIA
  • "AU" - AUSTRALIA
  • "BA" - BOSNIA HERZEGOVINA
  • "BE" - BELGIUM
  • "BG" - BULGARIA
  • "BO" - BOLIVIA
  • "BR" - BRAZIL
  • "BY" - BELARUS
  • "CA" - CANADA
  • "CL" - CHILE
  • "CO" - COLOMBIA
  • "CR" - COSTA RICA
  • "HR" - CROATIA
  • "CZ" - CZECH REPUBLIC
  • "DK" - DENMARK
  • "EC" - ECUADOR
  • "EE" - ESTONIA
  • "ET" - ETHIOPIA
  • "FI" - FINLAND
  • "FR" - FRANCE
  • "DE" - GERMANY
  • "GR" - GREECE
  • "HU" - HUNGARY
  • "IS" - ICELAND
  • "IN" - INDIA
  • "IE" - IRELAND
  • "IT" - ITALY
  • "JP" - JAPAN
  • "KZ" - KAZAKHSTAN
  • "KR" - KOREA
  • "LV" - LATVIA
  • "LI" - LIECHTENSTEIN
  • "LT" - LITHUANIA
  • "LU" - LUXEMBOURG
  • "MK" - MACEDONIA
  • "MT" - MALTA
  • "MX" - MEXICO
  • "MD" - MOLDOVA
  • "ME" - MONTENEGRO
  • "NL" - NETHERLANDS
  • "NZ" - NEW ZEALAND
  • "NI" - NICARAGUA
  • "NG" - NIGERIA
  • "NO" - NORWAY
  • "PA" - PANAMA
  • "PY" - PARAGUAY
  • "PE" - PERU
  • "PL" - POLAND
  • "PT" - PORTUGAL
  • "RO" - ROMANIA
  • "RU" - RUSSIA
  • "RS" - SERBIA
  • "SK" - SLOVAKIA
  • "SI" - SLOVENIA
  • "ZA" - SOUTH AFRICA
  • "ES" - SPAIN
  • "SE" - SWEDEN
  • "CH" - SWITZERLAND
  • "UA" - UKRAINE
  • "AE" - UNITED ARAB EMIRATES
  • "US" - UNITED STATES
  • "UK" - UNITED KINGDOM
  • "UY" - URUGUAY
  • "VE" - VENEZUELA

key -> (string)

value -> (list)

(string)

JSON Syntax:

{
  "DatasetGroupArn": "string",
  "AttributeConfigs": [
    {
      "AttributeName": "string",
      "Transformations": {"string": "string"
        ...}
    }
    ...
  ],
  "AdditionalDatasets": [
    {
      "Name": "string",
      "Configuration": {"string": ["string", ...]
        ...}
    }
    ...
  ]
}

--encryption-config (structure)

An Key Management Service (KMS) key and an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key. You can specify this optional object in the CreateDataset and CreatePredictor requests.

RoleArn -> (string)

The ARN of the IAM role that Amazon Forecast can assume to access the KMS key.

Passing a role across Amazon Web Services accounts is not allowed. If you pass a role that isn't in your account, you get an InvalidInputException error.

KMSKeyArn -> (string)

The Amazon Resource Name (ARN) of the KMS key.

Shorthand Syntax:

RoleArn=string,KMSKeyArn=string

JSON Syntax:

{
  "RoleArn": "string",
  "KMSKeyArn": "string"
}

--reference-predictor-arn (string)

The ARN of the predictor to retrain or upgrade. This parameter is only used when retraining or upgrading a predictor. When creating a new predictor, do not specify a value for this parameter.

When upgrading or retraining a predictor, only specify values for the ReferencePredictorArn and PredictorName . The value for PredictorName must be a unique predictor name.

--optimization-metric (string)

The accuracy metric used to optimize the predictor.

Possible values:

  • WAPE
  • RMSE
  • AverageWeightedQuantileLoss
  • MASE
  • MAPE

--explain-predictor | --no-explain-predictor (boolean)

Create an Explainability resource for the predictor.

--tags (list)

Optional metadata to help you categorize and organize your predictors. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive.

The following restrictions apply to tags:

  • For each resource, each tag key must be unique and each tag key must have one value.
  • Maximum number of tags per resource: 50.
  • Maximum key length: 128 Unicode characters in UTF-8.
  • Maximum value length: 256 Unicode characters in UTF-8.
  • Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across other services and resources, the character restrictions of those services also apply.
  • Key prefixes cannot include any upper or lowercase combination of aws: or AWS: . Values can have this prefix. If a tag value has aws as its prefix but the key does not, Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of aws do not count against your tags per resource limit. You cannot edit or delete tag keys with this prefix.

(structure)

The optional metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.

The following basic restrictions apply to tags:

  • Maximum number of tags per resource - 50.
  • For each resource, each tag key must be unique, and each tag key can have only one value.
  • Maximum key length - 128 Unicode characters in UTF-8.
  • Maximum value length - 256 Unicode characters in UTF-8.
  • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
  • Tag keys and values are case sensitive.
  • Do not use aws: , AWS: , or any upper or lowercase combination of such as a prefix for keys as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has aws as its prefix but the key does not, then Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of aws do not count against your tags per resource limit.

Key -> (string)

One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

Value -> (string)

The optional part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key).

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

[
  {
    "Key": "string",
    "Value": "string"
  }
  ...
]

--monitor-config (structure)

The configuration details for predictor monitoring. Provide a name for the monitor resource to enable predictor monitoring.

Predictor monitoring allows you to see how your predictor's performance changes over time. For more information, see Predictor Monitoring .

MonitorName -> (string)

The name of the monitor resource.

Shorthand Syntax:

MonitorName=string

JSON Syntax:

{
  "MonitorName": "string"
}

--time-alignment-boundary (structure)

The time boundary Forecast uses to align and aggregate any data that doesn't align with your forecast frequency. Provide the unit of time and the time boundary as a key value pair. For more information on specifying a time boundary, see Specifying a Time Boundary . If you don't provide a time boundary, Forecast uses a set of Default Time Boundaries .

Month -> (string)

The month to use for time alignment during aggregation. The month must be in uppercase.

DayOfMonth -> (integer)

The day of the month to use for time alignment during aggregation.

DayOfWeek -> (string)

The day of week to use for time alignment during aggregation. The day must be in uppercase.

Hour -> (integer)

The hour of day to use for time alignment during aggregation.

Shorthand Syntax:

Month=string,DayOfMonth=integer,DayOfWeek=string,Hour=integer

JSON Syntax:

{
  "Month": "JANUARY"|"FEBRUARY"|"MARCH"|"APRIL"|"MAY"|"JUNE"|"JULY"|"AUGUST"|"SEPTEMBER"|"OCTOBER"|"NOVEMBER"|"DECEMBER",
  "DayOfMonth": integer,
  "DayOfWeek": "MONDAY"|"TUESDAY"|"WEDNESDAY"|"THURSDAY"|"FRIDAY"|"SATURDAY"|"SUNDAY",
  "Hour": integer
}

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command's default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination.

--output (string)

The formatting style for command output.

  • json
  • text
  • table

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

Output

PredictorArn -> (string)

The Amazon Resource Name (ARN) of the predictor.