Class: AWS.ForecastService

Inherits:
AWS.Service show all
Identifier:
forecastservice
API Version:
2018-06-26
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Provides APIs for creating and managing Amazon Forecast resources.

Sending a Request Using ForecastService

var forecastservice = new AWS.ForecastService();
forecastservice.createDataset(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the ForecastService object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var forecastservice = new AWS.ForecastService({apiVersion: '2018-06-26'});

You can also set the API version globally in AWS.config.apiVersions using the forecastservice service identifier:

AWS.config.apiVersions = {
  forecastservice: '2018-06-26',
  // other service API versions
};

var forecastservice = new AWS.ForecastService();

Version:

  • 2018-06-26

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.ForecastService(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a ForecastService object

var forecastservice = new AWS.ForecastService({apiVersion: '2018-06-26'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.ForecastService.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.ForecastService.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.ForecastService.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createDataset(params = {}, callback) ⇒ AWS.Request

Creates an Amazon Forecast dataset. The information about the dataset that you provide helps Forecast understand how to consume the data for model training. This includes the following:

  • DataFrequency - How frequently your historical time-series data is collected. Amazon Forecast uses this information when training the model and generating a forecast.

  • Domain and DatasetType - Each dataset has an associated dataset domain and a type within the domain. Amazon Forecast provides a list of predefined domains and types within each domain. For each unique dataset domain and type within the domain, Amazon Forecast requires your data to include a minimum set of predefined fields.

  • Schema - A schema specifies the fields of the dataset, including the field name and data type.

After creating a dataset, you import your training data into the dataset and add the dataset to a dataset group. You then use the dataset group to create a predictor. For more information, see howitworks-datasets-groups.

To get a list of all your datasets, use the ListDatasets operation.

Note: The Status of a dataset must be ACTIVE before you can import training data. Use the DescribeDataset operation to get the status.

Service Reference:

Examples:

Calling the createDataset operation

var params = {
  DatasetName: 'STRING_VALUE', /* required */
  DatasetType: TARGET_TIME_SERIES | RELATED_TIME_SERIES | ITEM_METADATA, /* required */
  Domain: RETAIL | CUSTOM | INVENTORY_PLANNING | EC2_CAPACITY | WORK_FORCE | WEB_TRAFFIC | METRICS, /* required */
  Schema: { /* required */
    Attributes: [
      {
        AttributeName: 'STRING_VALUE',
        AttributeType: string | integer | float | timestamp
      },
      /* more items */
    ]
  },
  DataFrequency: 'STRING_VALUE',
  EncryptionConfig: {
    KMSKeyArn: 'STRING_VALUE', /* required */
    RoleArn: 'STRING_VALUE' /* required */
  }
};
forecastservice.createDataset(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetName — (String)

      A name for the dataset.

    • Domain — (String)

      The domain associated with the dataset. The Domain and DatasetType that you choose determine the fields that must be present in the training data that you import to the dataset. For example, if you choose the RETAIL domain and TARGET_TIME_SERIES as the DatasetType, Amazon Forecast requires item_id, timestamp, and demand fields to be present in your data. For more information, see howitworks-datasets-groups.

      Possible values include:
      • "RETAIL"
      • "CUSTOM"
      • "INVENTORY_PLANNING"
      • "EC2_CAPACITY"
      • "WORK_FORCE"
      • "WEB_TRAFFIC"
      • "METRICS"
    • DatasetType — (String)

      The dataset type. Valid values depend on the chosen Domain.

      Possible values include:
      • "TARGET_TIME_SERIES"
      • "RELATED_TIME_SERIES"
      • "ITEM_METADATA"
    • DataFrequency — (String)

      The frequency of data collection.

      Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15 minutes), 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "D" indicates every day and "15min" indicates every 15 minutes.

    • Schema — (map)

      The schema for the dataset. The schema attributes and their order must match the fields in your data. The dataset Domain and DatasetType that you choose determine the minimum required fields in your training data. For information about the required fields for a specific dataset domain and type, see howitworks-domains-ds-types.

      • Attributes — (Array<map>)

        An array of attributes specifying the name and type of each field in a dataset.

        • AttributeName — (String)

          The name of the dataset field.

        • AttributeType — (String)

          The data type of the field.

          Possible values include:
          • "string"
          • "integer"
          • "float"
          • "timestamp"
    • EncryptionConfig — (map)

      An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.

      • RoleArnrequired — (String)

        The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the AWS KMS key.

        Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

      • KMSKeyArnrequired — (String)

        The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DatasetArn — (String)

        The Amazon Resource Name (ARN) of the dataset.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDatasetGroup(params = {}, callback) ⇒ AWS.Request

Creates an Amazon Forecast dataset group, which holds a collection of related datasets. You can add datasets to the dataset group when you create the dataset group, or you can add datasets later with the UpdateDatasetGroup operation.

After creating a dataset group and adding datasets, you use the dataset group when you create a predictor. For more information, see howitworks-datasets-groups.

To get a list of all your datasets groups, use the ListDatasetGroups operation.

Note: The Status of a dataset group must be ACTIVE before you can create a predictor using the dataset group. Use the DescribeDatasetGroup operation to get the status.

Service Reference:

Examples:

Calling the createDatasetGroup operation

var params = {
  DatasetGroupName: 'STRING_VALUE', /* required */
  Domain: RETAIL | CUSTOM | INVENTORY_PLANNING | EC2_CAPACITY | WORK_FORCE | WEB_TRAFFIC | METRICS, /* required */
  DatasetArns: [
    'STRING_VALUE',
    /* more items */
  ]
};
forecastservice.createDatasetGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetGroupName — (String)

      A name for the dataset group.

    • Domain — (String)

      The domain associated with the dataset group. The Domain and DatasetType that you choose determine the fields that must be present in the training data that you import to the dataset. For example, if you choose the RETAIL domain and TARGET_TIME_SERIES as the DatasetType, Amazon Forecast requires item_id, timestamp, and demand fields to be present in your data. For more information, see howitworks-datasets-groups.

      Possible values include:
      • "RETAIL"
      • "CUSTOM"
      • "INVENTORY_PLANNING"
      • "EC2_CAPACITY"
      • "WORK_FORCE"
      • "WEB_TRAFFIC"
      • "METRICS"
    • DatasetArns — (Array<String>)

      An array of Amazon Resource Names (ARNs) of the datasets that you want to include in the dataset group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DatasetGroupArn — (String)

        The Amazon Resource Name (ARN) of the dataset group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDatasetImportJob(params = {}, callback) ⇒ AWS.Request

Imports your training data to an Amazon Forecast dataset. You provide the location of your training data in an Amazon Simple Storage Service (Amazon S3) bucket and the Amazon Resource Name (ARN) of the dataset that you want to import the data to.

You must specify a DataSource object that includes an AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the data. For more information, see aws-forecast-iam-roles.

Two properties of the training data are optionally specified:

  • The delimiter that separates the data fields.

    The default delimiter is a comma (,), which is the only supported delimiter in this release.

  • The format of timestamps.

    If the format is not specified, Amazon Forecast expects the format to be "yyyy-MM-dd HH:mm:ss".

When Amazon Forecast uploads your training data, it verifies that the data was collected at the DataFrequency specified when the target dataset was created. For more information, see CreateDataset and howitworks-datasets-groups. Amazon Forecast also verifies the delimiter and timestamp format.

You can use the ListDatasetImportJobs operation to get a list of all your dataset import jobs, filtered by specified criteria.

To get a list of all your dataset import jobs, filtered by the specified criteria, use the ListDatasetGroups operation.

Service Reference:

Examples:

Calling the createDatasetImportJob operation

var params = {
  DataSource: { /* required */
    S3Config: { /* required */
      Path: 'STRING_VALUE', /* required */
      RoleArn: 'STRING_VALUE', /* required */
      KMSKeyArn: 'STRING_VALUE'
    }
  },
  DatasetArn: 'STRING_VALUE', /* required */
  DatasetImportJobName: 'STRING_VALUE', /* required */
  TimestampFormat: 'STRING_VALUE'
};
forecastservice.createDatasetImportJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetImportJobName — (String)

      The name for the dataset import job. It is recommended to include the current timestamp in the name to guard against getting a ResourceAlreadyExistsException exception, for example, 20190721DatasetImport.

    • DatasetArn — (String)

      The Amazon Resource Name (ARN) of the Amazon Forecast dataset that you want to import data to.

    • DataSource — (map)

      The location of the training data to import and an AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the data.

      • S3Configrequired — (map)

        The path to the training data stored in an Amazon Simple Storage Service (Amazon S3) bucket along with the credentials to access the data.

        • Pathrequired — (String)

          The path to an Amazon Simple Storage Service (Amazon S3) bucket or file(s) in an Amazon S3 bucket.

        • RoleArnrequired — (String)

          The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket or file(s).

          Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

        • KMSKeyArn — (String)

          The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

    • TimestampFormat — (String)

      The format of timestamps in the dataset. Two formats are supported, dependent on the DataFrequency specified when the dataset was created.

      • "yyyy-MM-dd"

        For data frequencies: Y, M, W, and D

      • "yyyy-MM-dd HH:mm:ss"

        For data frequencies: H, 30min, 15min, and 1min; and optionally, for: Y, M, W, and D

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DatasetImportJobArn — (String)

        The Amazon Resource Name (ARN) of the dataset import job.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createForecast(params = {}, callback) ⇒ AWS.Request

Creates a forecast for each item in the TARGET_TIME_SERIES dataset that was used to train the predictor. This is known as inference. To retrieve the forecast for a single item at low latency, use the operation. To export the complete forecast into your Amazon Simple Storage Service (Amazon S3), use the CreateForecastExportJob operation.

The range of the forecast is determined by the ForecastHorizon, specified in the CreatePredictor request, multiplied by the DataFrequency, specified in the CreateDataset request. When you query a forecast, you can request a specific date range within the complete forecast.

To get a list of all your forecasts, use the ListForecasts operation.

Note: The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used to create the predictor.

For more information, see howitworks-forecast.

Note: The Status of the forecast must be ACTIVE before you can query or export the forecast. Use the DescribeForecast operation to get the status.

Service Reference:

Examples:

Calling the createForecast operation

var params = {
  ForecastName: 'STRING_VALUE', /* required */
  PredictorArn: 'STRING_VALUE' /* required */
};
forecastservice.createForecast(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ForecastName — (String)

      The name for the forecast.

    • PredictorArn — (String)

      The Amazon Resource Name (ARN) of the predictor to use to generate the forecast.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ForecastArn — (String)

        The Amazon Resource Name (ARN) of the forecast.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createForecastExportJob(params = {}, callback) ⇒ AWS.Request

Exports a forecast created by the CreateForecast operation to your Amazon Simple Storage Service (Amazon S3) bucket.

You must specify a DataDestination object that includes an AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see aws-forecast-iam-roles.

For more information, see howitworks-forecast.

To get a list of all your forecast export jobs, use the ListForecastExportJobs operation.

Note: The Status of the forecast export job must be ACTIVE before you can access the forecast in your Amazon S3 bucket. Use the DescribeForecastExportJob operation to get the status.

Service Reference:

Examples:

Calling the createForecastExportJob operation

var params = {
  Destination: { /* required */
    S3Config: { /* required */
      Path: 'STRING_VALUE', /* required */
      RoleArn: 'STRING_VALUE', /* required */
      KMSKeyArn: 'STRING_VALUE'
    }
  },
  ForecastArn: 'STRING_VALUE', /* required */
  ForecastExportJobName: 'STRING_VALUE' /* required */
};
forecastservice.createForecastExportJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ForecastExportJobName — (String)

      The name for the forecast export job.

    • ForecastArn — (String)

      The Amazon Resource Name (ARN) of the forecast that you want to export.

    • Destination — (map)

      The path to the Amazon S3 bucket where you want to save the forecast and an AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the bucket.

      • S3Configrequired — (map)

        The path to an Amazon Simple Storage Service (Amazon S3) bucket along with the credentials to access the bucket.

        • Pathrequired — (String)

          The path to an Amazon Simple Storage Service (Amazon S3) bucket or file(s) in an Amazon S3 bucket.

        • RoleArnrequired — (String)

          The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket or file(s).

          Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

        • KMSKeyArn — (String)

          The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ForecastExportJobArn — (String)

        The Amazon Resource Name (ARN) of the export job.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createPredictor(params = {}, callback) ⇒ AWS.Request

Creates an Amazon Forecast predictor.

In the request, you provide a dataset group and either specify an algorithm or let Amazon Forecast choose the algorithm for you using AutoML. If you specify an algorithm, you also can override algorithm-specific hyperparameters.

Amazon Forecast uses the chosen algorithm to train a model using the latest version of the datasets in the specified dataset group. The result is called a predictor. You then generate a forecast using the CreateForecast operation.

After training a model, the CreatePredictor operation also evaluates it. To see the evaluation metrics, use the GetAccuracyMetrics operation. Always review the evaluation metrics before deciding to use the predictor to generate a forecast.

Optionally, you can specify a featurization configuration to fill and aggragate the data fields in the TARGET_TIME_SERIES dataset to improve model training. For more information, see FeaturizationConfig.

AutoML

If you set PerformAutoML to true, Amazon Forecast evaluates each algorithm and chooses the one that minimizes the objective function. The objective function is defined as the mean of the weighted p10, p50, and p90 quantile losses. For more information, see EvaluationResult.

When AutoML is enabled, the following properties are disallowed:

  • AlgorithmArn

  • HPOConfig

  • PerformHPO

  • TrainingParameters

To get a list of all your predictors, use the ListPredictors operation.

Note: The Status of the predictor must be ACTIVE, signifying that training has completed, before you can use the predictor to create a forecast. Use the DescribePredictor operation to get the status.

Service Reference:

Examples:

Calling the createPredictor operation

var params = {
  FeaturizationConfig: { /* required */
    ForecastFrequency: 'STRING_VALUE', /* required */
    Featurizations: [
      {
        AttributeName: 'STRING_VALUE', /* required */
        FeaturizationPipeline: [
          {
            FeaturizationMethodName: filling, /* required */
            FeaturizationMethodParameters: {
              '<ParameterKey>': 'STRING_VALUE',
              /* '<ParameterKey>': ... */
            }
          },
          /* more items */
        ]
      },
      /* more items */
    ],
    ForecastDimensions: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  ForecastHorizon: 'NUMBER_VALUE', /* required */
  InputDataConfig: { /* required */
    DatasetGroupArn: 'STRING_VALUE', /* required */
    SupplementaryFeatures: [
      {
        Name: 'STRING_VALUE', /* required */
        Value: 'STRING_VALUE' /* required */
      },
      /* more items */
    ]
  },
  PredictorName: 'STRING_VALUE', /* required */
  AlgorithmArn: 'STRING_VALUE',
  EncryptionConfig: {
    KMSKeyArn: 'STRING_VALUE', /* required */
    RoleArn: 'STRING_VALUE' /* required */
  },
  EvaluationParameters: {
    BackTestWindowOffset: 'NUMBER_VALUE',
    NumberOfBacktestWindows: 'NUMBER_VALUE'
  },
  HPOConfig: {
    ParameterRanges: {
      CategoricalParameterRanges: [
        {
          Name: 'STRING_VALUE', /* required */
          Values: [ /* required */
            'STRING_VALUE',
            /* more items */
          ]
        },
        /* more items */
      ],
      ContinuousParameterRanges: [
        {
          MaxValue: 'NUMBER_VALUE', /* required */
          MinValue: 'NUMBER_VALUE', /* required */
          Name: 'STRING_VALUE', /* required */
          ScalingType: Auto | Linear | Logarithmic | ReverseLogarithmic
        },
        /* more items */
      ],
      IntegerParameterRanges: [
        {
          MaxValue: 'NUMBER_VALUE', /* required */
          MinValue: 'NUMBER_VALUE', /* required */
          Name: 'STRING_VALUE', /* required */
          ScalingType: Auto | Linear | Logarithmic | ReverseLogarithmic
        },
        /* more items */
      ]
    }
  },
  PerformAutoML: true || false,
  PerformHPO: true || false,
  TrainingParameters: {
    '<ParameterKey>': 'STRING_VALUE',
    /* '<ParameterKey>': ... */
  }
};
forecastservice.createPredictor(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • PredictorName — (String)

      A name for the predictor.

    • AlgorithmArn — (String)

      The Amazon Resource Name (ARN) of the algorithm to use for model training. Required if PerformAutoML is not set to true.

      Supported algorithms

      • arn:aws:forecast:::algorithm/ARIMA

      • arn:aws:forecast:::algorithm/Deep_AR_Plus

        - supports hyperparameter optimization (HPO)

      • arn:aws:forecast:::algorithm/ETS

      • arn:aws:forecast:::algorithm/NPTS

      • arn:aws:forecast:::algorithm/Prophet

    • ForecastHorizon — (Integer)

      Specifies the number of time-steps that the model is trained to predict. The forecast horizon is also called the prediction length.

      For example, if you configure a dataset for daily data collection (using the DataFrequency parameter of the CreateDataset operation) and set the forecast horizon to 10, the model returns predictions for 10 days.

    • PerformAutoML — (Boolean)

      Whether to perform AutoML. The default value is false. In this case, you are required to specify an algorithm.

      If you want Amazon Forecast to evaluate the algorithms it provides and choose the best algorithm and configuration for your training dataset, set PerformAutoML to true. This is a good option if you aren't sure which algorithm is suitable for your application.

    • PerformHPO — (Boolean)

      Whether to perform hyperparameter optimization (HPO). HPO finds optimal hyperparameter values for your training data. The process of performing HPO is known as a hyperparameter tuning job.

      The default value is false. In this case, Amazon Forecast uses default hyperparameter values from the chosen algorithm.

      To override the default values, set PerformHPO to true and supply the HyperParameterTuningJobConfig object. The tuning job specifies an objective metric, the hyperparameters to optimize, and the valid range for each hyperparameter.

      The following algorithms support HPO:

      • DeepAR+

    • TrainingParameters — (map<String>)

      The training parameters to override for model training. The parameters that you can override are listed in the individual algorithms in aws-forecast-choosing-recipes.

    • EvaluationParameters — (map)

      Used to override the default evaluation parameters of the specified algorithm. Amazon Forecast evaluates a predictor by splitting a dataset into training data and testing data. The evaluation parameters define how to perform the split and the number of iterations.

      • NumberOfBacktestWindows — (Integer)

        The number of times to split the input data. The default is 1. The range is 1 through 5.

      • BackTestWindowOffset — (Integer)

        The point from the end of the dataset where you want to split the data for model training and evaluation. The value is specified as the number of data points.

    • HPOConfig — (map)

      Provides hyperparameter override values for the algorithm. If you don't provide this parameter, Amazon Forecast uses default values. The individual algorithms specify which hyperparameters support hyperparameter optimization (HPO). For more information, see aws-forecast-choosing-recipes.

      • ParameterRanges — (map)

        Specifies the ranges of valid values for the hyperparameters.

        • CategoricalParameterRanges — (Array<map>)

          Specifies the tunable range for each categorical hyperparameter.

          • Namerequired — (String)

            The name of the categorical hyperparameter to tune.

          • Valuesrequired — (Array<String>)

            A list of the tunable categories for the hyperparameter.

        • ContinuousParameterRanges — (Array<map>)

          Specifies the tunable range for each continuous hyperparameter.

          • Namerequired — (String)

            The name of the hyperparameter to tune.

          • MaxValuerequired — (Float)

            The maximum tunable value of the hyperparameter.

          • MinValuerequired — (Float)

            The minimum tunable value of the hyperparameter.

          • ScalingType — (String)

            The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling. One of the following values:

            Auto

            Amazon Forecast hyperparameter tuning chooses the best scale for the hyperparameter.

            Linear

            Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

            Logarithmic

            Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

            Logarithmic scaling works only for ranges that have only values greater than 0.

            ReverseLogarithmic

            Hyperparemeter tuning searches the values in the hyperparameter range by using a reverse logarithmic scale.

            Reverse logarithmic scaling works only for ranges that are entirely within the range 0 <= x < 1.0.

            Possible values include:
            • "Auto"
            • "Linear"
            • "Logarithmic"
            • "ReverseLogarithmic"
        • IntegerParameterRanges — (Array<map>)

          Specifies the tunable range for each integer hyperparameter.

          • Namerequired — (String)

            The name of the hyperparameter to tune.

          • MaxValuerequired — (Integer)

            The maximum tunable value of the hyperparameter.

          • MinValuerequired — (Integer)

            The minimum tunable value of the hyperparameter.

          • ScalingType — (String)

            The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling. One of the following values:

            Auto

            Amazon Forecast hyperparameter tuning chooses the best scale for the hyperparameter.

            Linear

            Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

            Logarithmic

            Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

            Logarithmic scaling works only for ranges that have only values greater than 0.

            ReverseLogarithmic

            Not supported for IntegerParameterRange.

            Reverse logarithmic scaling works only for ranges that are entirely within the range 0 <= x < 1.0.

            Possible values include:
            • "Auto"
            • "Linear"
            • "Logarithmic"
            • "ReverseLogarithmic"
    • InputDataConfig — (map)

      Describes the dataset group that contains the data to use to train the predictor.

      • DatasetGroupArnrequired — (String)

        The Amazon Resource Name (ARN) of the dataset group.

      • SupplementaryFeatures — (Array<map>)

        An array of supplementary features. For this release, the only supported feature is a holiday calendar.

        • Namerequired — (String)

          The name of the feature. This must be "holiday".

        • Valuerequired — (String)

          One of the following 2 letter country codes:

          • "AU" - AUSTRALIA

          • "DE" - GERMANY

          • "JP" - JAPAN

          • "US" - UNITED_STATES

          • "UK" - UNITED_KINGDOM

    • FeaturizationConfig — (map)

      The featurization configuration.

      • ForecastFrequencyrequired — (String)

        The frequency of predictions in a forecast.

        Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15 minutes), 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "Y" indicates every year and "5min" indicates every five minutes.

      • ForecastDimensions — (Array<String>)

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

        For example, suppose that you are generating a forecast for item sales across all of your stores, and your dataset contains a store_id field. If you want the sales forecast for each item by store, you would specify store_id as the dimension.

      • Featurizations — (Array<map>)

        An array of featurization (transformation) information for the fields of a dataset. In this release, only a single featurization is supported.

        • AttributeNamerequired — (String)

          The name of the schema attribute specifying the data field to be featurized. In this release, only the target field of the TARGET_TIME_SERIES dataset type is supported. For example, for the RETAIL domain, the target is demand, and for the CUSTOM domain, the target is target_value.

        • FeaturizationPipeline — (Array<map>)

          An array FeaturizationMethod objects that specifies the feature transformation methods. For this release, the number of methods is limited to one.

          • FeaturizationMethodNamerequired — (String)

            The name of the method. In this release, "filling" is the only supported method.

            Possible values include:
            • "filling"
          • FeaturizationMethodParameters — (map<String>)

            The method parameters (key-value pairs). Specify these to override the default values. The following list shows the parameters and their valid values. Bold signifies the default value.

            • aggregation: sum, avg, first, min, max

            • frontfill: none

            • middlefill: zero, nan (not a number)

            • backfill: zero, nan

    • EncryptionConfig — (map)

      An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.

      • RoleArnrequired — (String)

        The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the AWS KMS key.

        Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

      • KMSKeyArnrequired — (String)

        The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • PredictorArn — (String)

        The Amazon Resource Name (ARN) of the predictor.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDataset(params = {}, callback) ⇒ AWS.Request

Deletes an Amazon Forecast dataset created using the CreateDataset operation. To be deleted, the dataset must have a status of ACTIVE or CREATE_FAILED. Use the DescribeDataset operation to get the status.

Service Reference:

Examples:

Calling the deleteDataset operation

var params = {
  DatasetArn: 'STRING_VALUE' /* required */
};
forecastservice.deleteDataset(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetArn — (String)

      The Amazon Resource Name (ARN) of the dataset to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDatasetGroup(params = {}, callback) ⇒ AWS.Request

Deletes a dataset group created using the CreateDatasetGroup operation. To be deleted, the dataset group must have a status of ACTIVE, CREATE_FAILED, or UPDATE_FAILED. Use the DescribeDatasetGroup operation to get the status.

The operation deletes only the dataset group, not the datasets in the group.

Service Reference:

Examples:

Calling the deleteDatasetGroup operation

var params = {
  DatasetGroupArn: 'STRING_VALUE' /* required */
};
forecastservice.deleteDatasetGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetGroupArn — (String)

      The Amazon Resource Name (ARN) of the dataset group to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDatasetImportJob(params = {}, callback) ⇒ AWS.Request

Deletes a dataset import job created using the CreateDatasetImportJob operation. To be deleted, the import job must have a status of ACTIVE or CREATE_FAILED. Use the DescribeDatasetImportJob operation to get the status.

Service Reference:

Examples:

Calling the deleteDatasetImportJob operation

var params = {
  DatasetImportJobArn: 'STRING_VALUE' /* required */
};
forecastservice.deleteDatasetImportJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetImportJobArn — (String)

      The Amazon Resource Name (ARN) of the dataset import job to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteForecast(params = {}, callback) ⇒ AWS.Request

Deletes a forecast created using the CreateForecast operation. To be deleted, the forecast must have a status of ACTIVE or CREATE_FAILED. Use the DescribeForecast operation to get the status.

You can't delete a forecast while it is being exported.

Service Reference:

Examples:

Calling the deleteForecast operation

var params = {
  ForecastArn: 'STRING_VALUE' /* required */
};
forecastservice.deleteForecast(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ForecastArn — (String)

      The Amazon Resource Name (ARN) of the forecast to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteForecastExportJob(params = {}, callback) ⇒ AWS.Request

Deletes a forecast export job created using the CreateForecastExportJob operation. To be deleted, the export job must have a status of ACTIVE or CREATE_FAILED. Use the DescribeForecastExportJob operation to get the status.

Service Reference:

Examples:

Calling the deleteForecastExportJob operation

var params = {
  ForecastExportJobArn: 'STRING_VALUE' /* required */
};
forecastservice.deleteForecastExportJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ForecastExportJobArn — (String)

      The Amazon Resource Name (ARN) of the forecast export job to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePredictor(params = {}, callback) ⇒ AWS.Request

Deletes a predictor created using the CreatePredictor operation. To be deleted, the predictor must have a status of ACTIVE or CREATE_FAILED. Use the DescribePredictor operation to get the status.

Any forecasts generated by the predictor will no longer be available.

Service Reference:

Examples:

Calling the deletePredictor operation

var params = {
  PredictorArn: 'STRING_VALUE' /* required */
};
forecastservice.deletePredictor(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • PredictorArn — (String)

      The Amazon Resource Name (ARN) of the predictor to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDataset(params = {}, callback) ⇒ AWS.Request

Describes an Amazon Forecast dataset created using the CreateDataset operation.

In addition to listing the properties provided by the user in the CreateDataset request, this operation includes the following properties:

  • CreationTime

  • LastModificationTime

  • Status

Service Reference:

Examples:

Calling the describeDataset operation

var params = {
  DatasetArn: 'STRING_VALUE' /* required */
};
forecastservice.describeDataset(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetArn — (String)

      The Amazon Resource Name (ARN) of the dataset.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DatasetArn — (String)

        The Amazon Resource Name (ARN) of the dataset.

      • DatasetName — (String)

        The name of the dataset.

      • Domain — (String)

        The dataset domain.

        Possible values include:
        • "RETAIL"
        • "CUSTOM"
        • "INVENTORY_PLANNING"
        • "EC2_CAPACITY"
        • "WORK_FORCE"
        • "WEB_TRAFFIC"
        • "METRICS"
      • DatasetType — (String)

        The dataset type.

        Possible values include:
        • "TARGET_TIME_SERIES"
        • "RELATED_TIME_SERIES"
        • "ITEM_METADATA"
      • DataFrequency — (String)

        The frequency of data collection.

        Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15 minutes), 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "M" indicates every month and "30min" indicates every 30 minutes.

      • Schema — (map)

        An array of SchemaAttribute objects that specify the dataset fields. Each SchemaAttribute specifies the name and data type of a field.

        • Attributes — (Array<map>)

          An array of attributes specifying the name and type of each field in a dataset.

          • AttributeName — (String)

            The name of the dataset field.

          • AttributeType — (String)

            The data type of the field.

            Possible values include:
            • "string"
            • "integer"
            • "float"
            • "timestamp"
      • EncryptionConfig — (map)

        An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.

        • RoleArnrequired — (String)

          The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the AWS KMS key.

          Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

        • KMSKeyArnrequired — (String)

          The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

      • Status — (String)

        The status of the dataset. States include:

        • ACTIVE

        • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

        • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

        • UPDATE_PENDING, UPDATE_IN_PROGRESS, UPDATE_FAILED

        The UPDATE states apply while data is imported to the dataset from a call to the CreateDatasetImportJob operation. During this time, the status reflects the status of the dataset import job. For example, when the import job status is CREATE_IN_PROGRESS, the status of the dataset is UPDATE_IN_PROGRESS.

        Note: The Status of the dataset must be ACTIVE before you can import training data.
      • CreationTime — (Date)

        When the dataset was created.

      • LastModificationTime — (Date)

        When the dataset is created, LastModificationTime is the same as CreationTime. After a CreateDatasetImportJob operation is called, LastModificationTime is when the import job finished or failed. While data is being imported to the dataset, LastModificationTime is the current query time.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDatasetGroup(params = {}, callback) ⇒ AWS.Request

Describes a dataset group created using the CreateDatasetGroup operation.

In addition to listing the properties provided by the user in the CreateDatasetGroup request, this operation includes the following properties:

  • DatasetArns - The datasets belonging to the group.

  • CreationTime

  • LastModificationTime

  • Status

Service Reference:

Examples:

Calling the describeDatasetGroup operation

var params = {
  DatasetGroupArn: 'STRING_VALUE' /* required */
};
forecastservice.describeDatasetGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetGroupArn — (String)

      The Amazon Resource Name (ARN) of the dataset group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DatasetGroupName — (String)

        The name of the dataset group.

      • DatasetGroupArn — (String)

        The ARN of the dataset group.

      • DatasetArns — (Array<String>)

        An array of Amazon Resource Names (ARNs) of the datasets contained in the dataset group.

      • Domain — (String)

        The domain associated with the dataset group. The Domain and DatasetType that you choose determine the fields that must be present in the training data that you import to the dataset. For example, if you choose the RETAIL domain and TARGET_TIME_SERIES as the DatasetType, Amazon Forecast requires item_id, timestamp, and demand fields to be present in your data. For more information, see howitworks-datasets-groups.

        Possible values include:
        • "RETAIL"
        • "CUSTOM"
        • "INVENTORY_PLANNING"
        • "EC2_CAPACITY"
        • "WORK_FORCE"
        • "WEB_TRAFFIC"
        • "METRICS"
      • Status — (String)

        The status of the dataset group. States include:

        • ACTIVE

        • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

        • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

        • UPDATE_PENDING, UPDATE_IN_PROGRESS, UPDATE_FAILED

        The UPDATE states apply when the UpdateDatasetGroup operation is called.

        Note: The Status of the dataset group must be ACTIVE before creating a predictor using the dataset group.
      • CreationTime — (Date)

        When the dataset group was created.

      • LastModificationTime — (Date)

        When the dataset group was created or last updated from a call to the UpdateDatasetGroup operation. While the dataset group is being updated, LastModificationTime is the current query time.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDatasetImportJob(params = {}, callback) ⇒ AWS.Request

Describes a dataset import job created using the CreateDatasetImportJob operation.

In addition to listing the properties provided by the user in the CreateDatasetImportJob request, this operation includes the following properties:

  • CreationTime

  • LastModificationTime

  • DataSize

  • FieldStatistics

  • Status

  • Message - If an error occurred, information about the error.

Service Reference:

Examples:

Calling the describeDatasetImportJob operation

var params = {
  DatasetImportJobArn: 'STRING_VALUE' /* required */
};
forecastservice.describeDatasetImportJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetImportJobArn — (String)

      The Amazon Resource Name (ARN) of the dataset import job.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DatasetImportJobName — (String)

        The name of the dataset import job.

      • DatasetImportJobArn — (String)

        The ARN of the dataset import job.

      • DatasetArn — (String)

        The Amazon Resource Name (ARN) of the dataset that the training data was imported to.

      • TimestampFormat — (String)

        The format of timestamps in the dataset. Two formats are supported dependent on the DataFrequency specified when the dataset was created.

        • "yyyy-MM-dd"

          For data frequencies: Y, M, W, and D

        • "yyyy-MM-dd HH:mm:ss"

          For data frequencies: H, 30min, 15min, and 1min; and optionally, for: Y, M, W, and D

      • DataSource — (map)

        The location of the training data to import. The training data must be stored in an Amazon S3 bucket.

        • S3Configrequired — (map)

          The path to the training data stored in an Amazon Simple Storage Service (Amazon S3) bucket along with the credentials to access the data.

          • Pathrequired — (String)

            The path to an Amazon Simple Storage Service (Amazon S3) bucket or file(s) in an Amazon S3 bucket.

          • RoleArnrequired — (String)

            The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket or file(s).

            Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

          • KMSKeyArn — (String)

            The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

      • FieldStatistics — (map<map>)

        Statistical information about each field in the input data.

        • Count — (Integer)

          The number of values in the field.

        • CountDistinct — (Integer)

          The number of distinct values in the field.

        • CountNull — (Integer)

          The number of null values in the field.

        • CountNan — (Integer)

          The number of NAN (not a number) values in the field.

        • Min — (String)

          For a numeric field, the minimum value in the field.

        • Max — (String)

          For a numeric field, the maximum value in the field.

        • Avg — (Float)

          For a numeric field, the average value in the field.

        • Stddev — (Float)

          For a numeric field, the standard deviation.

      • DataSize — (Float)

        The size of the dataset in gigabytes (GB) after completion of the import job.

      • Status — (String)

        The status of the dataset import job. The status is reflected in the status of the dataset. For example, when the import job status is CREATE_IN_PROGRESS, the status of the dataset is UPDATE_IN_PROGRESS. States include:

        • ACTIVE

        • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

        • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

      • Message — (String)

        If an error occurred, an informational message about the error.

      • CreationTime — (Date)

        When the dataset import job was created.

      • LastModificationTime — (Date)

        Dependent on the status as follows:

        • CREATE_PENDING - same as CreationTime

        • CREATE_IN_PROGRESS - the current timestamp

        • ACTIVE or CREATE_FAILED - when the job finished or failed

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeForecast(params = {}, callback) ⇒ AWS.Request

Describes a forecast created using the CreateForecast operation.

In addition to listing the properties provided by the user in the CreateForecast request, this operation includes the following properties:

  • DatasetGroupArn - The dataset group that provided the training data.

  • CreationTime

  • LastModificationTime

  • Status

  • Message - If an error occurred, information about the error.

Service Reference:

Examples:

Calling the describeForecast operation

var params = {
  ForecastArn: 'STRING_VALUE' /* required */
};
forecastservice.describeForecast(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ForecastArn — (String)

      The Amazon Resource Name (ARN) of the forecast.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ForecastArn — (String)

        The same forecast ARN as given in the request.

      • ForecastName — (String)

        The name of the forecast.

      • PredictorArn — (String)

        The ARN of the predictor used to generate the forecast.

      • DatasetGroupArn — (String)

        The ARN of the dataset group that provided the data used to train the predictor.

      • Status — (String)

        The status of the forecast. States include:

        • ACTIVE

        • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

        • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

        Note: The Status of the forecast must be ACTIVE before you can query or export the forecast.
      • Message — (String)

        If an error occurred, an informational message about the error.

      • CreationTime — (Date)

        When the forecast creation task was created.

      • LastModificationTime — (Date)

        Initially, the same as CreationTime (status is CREATE_PENDING). Updated when inference (creating the forecast) starts (status changed to CREATE_IN_PROGRESS), and when inference is complete (status changed to ACTIVE) or fails (status changed to CREATE_FAILED).

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeForecastExportJob(params = {}, callback) ⇒ AWS.Request

Describes a forecast export job created using the CreateForecastExportJob operation.

In addition to listing the properties provided by the user in the CreateForecastExportJob request, this operation includes the following properties:

  • CreationTime

  • LastModificationTime

  • Status

  • Message - If an error occurred, information about the error.

Service Reference:

Examples:

Calling the describeForecastExportJob operation

var params = {
  ForecastExportJobArn: 'STRING_VALUE' /* required */
};
forecastservice.describeForecastExportJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ForecastExportJobArn — (String)

      The Amazon Resource Name (ARN) of the forecast export job.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ForecastExportJobArn — (String)

        The ARN of the forecast export job.

      • ForecastExportJobName — (String)

        The name of the forecast export job.

      • ForecastArn — (String)

        The Amazon Resource Name (ARN) of the exported forecast.

      • Destination — (map)

        The path to the AWS S3 bucket where the forecast is exported.

        • S3Configrequired — (map)

          The path to an Amazon Simple Storage Service (Amazon S3) bucket along with the credentials to access the bucket.

          • Pathrequired — (String)

            The path to an Amazon Simple Storage Service (Amazon S3) bucket or file(s) in an Amazon S3 bucket.

          • RoleArnrequired — (String)

            The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket or file(s).

            Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

          • KMSKeyArn — (String)

            The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

      • Message — (String)

        If an error occurred, an informational message about the error.

      • Status — (String)

        The status of the forecast export job. One of the following states:

        • ACTIVE

        • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

        • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

        Note: The Status of the forecast export job must be ACTIVE before you can access the forecast in your Amazon S3 bucket.
      • CreationTime — (Date)

        When the forecast export job was created.

      • LastModificationTime — (Date)

        When the last successful export job finished.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describePredictor(params = {}, callback) ⇒ AWS.Request

Describes a predictor created using the CreatePredictor operation.

In addition to listing the properties provided by the user in the CreatePredictor request, this operation includes the following properties:

  • DatasetImportJobArns - The dataset import jobs used to import training data.

  • AutoMLAlgorithmArns - If AutoML is performed, the algorithms evaluated.

  • CreationTime

  • LastModificationTime

  • Status

  • Message - If an error occurred, information about the error.

Service Reference:

Examples:

Calling the describePredictor operation

var params = {
  PredictorArn: 'STRING_VALUE' /* required */
};
forecastservice.describePredictor(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • PredictorArn — (String)

      The Amazon Resource Name (ARN) of the predictor that you want information about.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • PredictorArn — (String)

        The ARN of the predictor.

      • PredictorName — (String)

        The name of the predictor.

      • AlgorithmArn — (String)

        The Amazon Resource Name (ARN) of the algorithm used for model training.

      • ForecastHorizon — (Integer)

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

      • PerformAutoML — (Boolean)

        Whether the predictor is set to perform AutoML.

      • PerformHPO — (Boolean)

        Whether the predictor is set to perform HPO.

      • TrainingParameters — (map<String>)

        The training parameters to override for model training. The parameters that you can override are listed in the individual algorithms in aws-forecast-choosing-recipes.

      • EvaluationParameters — (map)

        Used to override the default evaluation parameters of the specified algorithm. Amazon Forecast evaluates a predictor by splitting a dataset into training data and testing data. The evaluation parameters define how to perform the split and the number of iterations.

        • NumberOfBacktestWindows — (Integer)

          The number of times to split the input data. The default is 1. The range is 1 through 5.

        • BackTestWindowOffset — (Integer)

          The point from the end of the dataset where you want to split the data for model training and evaluation. The value is specified as the number of data points.

      • HPOConfig — (map)

        The hyperparameter override values for the algorithm.

        • ParameterRanges — (map)

          Specifies the ranges of valid values for the hyperparameters.

          • CategoricalParameterRanges — (Array<map>)

            Specifies the tunable range for each categorical hyperparameter.

            • Namerequired — (String)

              The name of the categorical hyperparameter to tune.

            • Valuesrequired — (Array<String>)

              A list of the tunable categories for the hyperparameter.

          • ContinuousParameterRanges — (Array<map>)

            Specifies the tunable range for each continuous hyperparameter.

            • Namerequired — (String)

              The name of the hyperparameter to tune.

            • MaxValuerequired — (Float)

              The maximum tunable value of the hyperparameter.

            • MinValuerequired — (Float)

              The minimum tunable value of the hyperparameter.

            • ScalingType — (String)

              The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling. One of the following values:

              Auto

              Amazon Forecast hyperparameter tuning chooses the best scale for the hyperparameter.

              Linear

              Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

              Logarithmic

              Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

              Logarithmic scaling works only for ranges that have only values greater than 0.

              ReverseLogarithmic

              Hyperparemeter tuning searches the values in the hyperparameter range by using a reverse logarithmic scale.

              Reverse logarithmic scaling works only for ranges that are entirely within the range 0 <= x < 1.0.

              Possible values include:
              • "Auto"
              • "Linear"
              • "Logarithmic"
              • "ReverseLogarithmic"
          • IntegerParameterRanges — (Array<map>)

            Specifies the tunable range for each integer hyperparameter.

            • Namerequired — (String)

              The name of the hyperparameter to tune.

            • MaxValuerequired — (Integer)

              The maximum tunable value of the hyperparameter.

            • MinValuerequired — (Integer)

              The minimum tunable value of the hyperparameter.

            • ScalingType — (String)

              The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling. One of the following values:

              Auto

              Amazon Forecast hyperparameter tuning chooses the best scale for the hyperparameter.

              Linear

              Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

              Logarithmic

              Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

              Logarithmic scaling works only for ranges that have only values greater than 0.

              ReverseLogarithmic

              Not supported for IntegerParameterRange.

              Reverse logarithmic scaling works only for ranges that are entirely within the range 0 <= x < 1.0.

              Possible values include:
              • "Auto"
              • "Linear"
              • "Logarithmic"
              • "ReverseLogarithmic"
      • InputDataConfig — (map)

        Describes the dataset group that contains the data to use to train the predictor.

        • DatasetGroupArnrequired — (String)

          The Amazon Resource Name (ARN) of the dataset group.

        • SupplementaryFeatures — (Array<map>)

          An array of supplementary features. For this release, the only supported feature is a holiday calendar.

          • Namerequired — (String)

            The name of the feature. This must be "holiday".

          • Valuerequired — (String)

            One of the following 2 letter country codes:

            • "AU" - AUSTRALIA

            • "DE" - GERMANY

            • "JP" - JAPAN

            • "US" - UNITED_STATES

            • "UK" - UNITED_KINGDOM

      • FeaturizationConfig — (map)

        The featurization configuration.

        • ForecastFrequencyrequired — (String)

          The frequency of predictions in a forecast.

          Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15 minutes), 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "Y" indicates every year and "5min" indicates every five minutes.

        • ForecastDimensions — (Array<String>)

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

          For example, suppose that you are generating a forecast for item sales across all of your stores, and your dataset contains a store_id field. If you want the sales forecast for each item by store, you would specify store_id as the dimension.

        • Featurizations — (Array<map>)

          An array of featurization (transformation) information for the fields of a dataset. In this release, only a single featurization is supported.

          • AttributeNamerequired — (String)

            The name of the schema attribute specifying the data field to be featurized. In this release, only the target field of the TARGET_TIME_SERIES dataset type is supported. For example, for the RETAIL domain, the target is demand, and for the CUSTOM domain, the target is target_value.

          • FeaturizationPipeline — (Array<map>)

            An array FeaturizationMethod objects that specifies the feature transformation methods. For this release, the number of methods is limited to one.

            • FeaturizationMethodNamerequired — (String)

              The name of the method. In this release, "filling" is the only supported method.

              Possible values include:
              • "filling"
            • FeaturizationMethodParameters — (map<String>)

              The method parameters (key-value pairs). Specify these to override the default values. The following list shows the parameters and their valid values. Bold signifies the default value.

              • aggregation: sum, avg, first, min, max

              • frontfill: none

              • middlefill: zero, nan (not a number)

              • backfill: zero, nan

      • EncryptionConfig — (map)

        An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.

        • RoleArnrequired — (String)

          The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the AWS KMS key.

          Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

        • KMSKeyArnrequired — (String)

          The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

      • DatasetImportJobArns — (Array<String>)

        An array of ARNs of the dataset import jobs used to import training data for the predictor.

      • AutoMLAlgorithmArns — (Array<String>)

        When PerformAutoML is specified, the ARN of the chosen algorithm.

      • Status — (String)

        The status of the predictor. States include:

        • ACTIVE

        • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

        • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

        • UPDATE_PENDING, UPDATE_IN_PROGRESS, UPDATE_FAILED

        Note: The Status of the predictor must be ACTIVE before using the predictor to create a forecast.
      • Message — (String)

        If an error occurred, an informational message about the error.

      • CreationTime — (Date)

        When the model training task was created.

      • LastModificationTime — (Date)

        Initially, the same as CreationTime (status is CREATE_PENDING). Updated when training starts (status changed to CREATE_IN_PROGRESS), and when training is complete (status changed to ACTIVE) or fails (status changed to CREATE_FAILED).

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAccuracyMetrics(params = {}, callback) ⇒ AWS.Request

Provides metrics on the accuracy of the models that were trained by the CreatePredictor operation. Use metrics to see how well the model performed and to decide whether to use the predictor to generate a forecast.

Metrics are generated for each backtest window evaluated. For more information, see EvaluationParameters.

The parameters of the filling method determine which items contribute to the metrics. If zero is specified, all items contribute. If nan is specified, only those items that have complete data in the range being evaluated contribute. For more information, see FeaturizationMethod.

For an example of how to train a model and review metrics, see getting-started.

Service Reference:

Examples:

Calling the getAccuracyMetrics operation

var params = {
  PredictorArn: 'STRING_VALUE' /* required */
};
forecastservice.getAccuracyMetrics(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • PredictorArn — (String)

      The Amazon Resource Name (ARN) of the predictor to get metrics for.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • PredictorEvaluationResults — (Array<map>)

        An array of results from evaluating the predictor.

        • AlgorithmArn — (String)

          The Amazon Resource Name (ARN) of the algorithm that was evaluated.

        • TestWindows — (Array<map>)

          The array of test windows used for evaluating the algorithm. The NumberOfBacktestWindows from the EvaluationParameters object determines the number of windows in the array.

          • TestWindowStart — (Date)

            The timestamp that defines the start of the window.

          • TestWindowEnd — (Date)

            The timestamp that defines the end of the window.

          • ItemCount — (Integer)

            The number of data points within the window.

          • EvaluationType — (String)

            The type of evaluation.

            • SUMMARY - The average metrics across all windows.

            • COMPUTED - The metrics for the specified window.

            Possible values include:
            • "SUMMARY"
            • "COMPUTED"
          • Metrics — (map)

            Provides metrics used to evaluate the performance of a predictor. This object is part of the WindowSummary object.

            • RMSE — (Float)

              The root mean square error (RMSE).

            • WeightedQuantileLosses — (Array<map>)

              An array of weighted quantile losses. Quantiles divide a probability distribution into regions of equal probability. The distribution in this case is the loss function.

              • Quantile — (Float)

                The quantile. Quantiles divide a probability distribution into regions of equal probability. For example, if the distribution was divided into 5 regions of equal probability, the quantiles would be 0.2, 0.4, 0.6, and 0.8.

              • LossValue — (Float)

                The difference between the predicted value and actual value over the quantile, weighted (normalized) by dividing by the sum over all quantiles.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDatasetGroups(params = {}, callback) ⇒ AWS.Request

Returns a list of dataset groups created using the CreateDatasetGroup operation. For each dataset group, a summary of its properties, including its Amazon Resource Name (ARN), is returned. You can retrieve the complete set of properties by using the ARN with the DescribeDatasetGroup operation.

Service Reference:

Examples:

Calling the listDatasetGroups operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
forecastservice.listDatasetGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

    • MaxResults — (Integer)

      The number of items to return in the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DatasetGroups — (Array<map>)

        An array of objects that summarize each dataset group's properties.

        • DatasetGroupArn — (String)

          The Amazon Resource Name (ARN) of the dataset group.

        • DatasetGroupName — (String)

          The name of the dataset group.

        • CreationTime — (Date)

          When the datase group was created.

        • LastModificationTime — (Date)

          When the dataset group was created or last updated from a call to the UpdateDatasetGroup operation. While the dataset group is being updated, LastModificationTime is the current query time.

      • NextToken — (String)

        If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDatasetImportJobs(params = {}, callback) ⇒ AWS.Request

Returns a list of dataset import jobs created using the CreateDatasetImportJob operation. For each import job, a summary of its properties, including its Amazon Resource Name (ARN), is returned. You can retrieve the complete set of properties by using the ARN with the DescribeDatasetImportJob operation. You can filter the list by providing an array of Filter objects.

Service Reference:

Examples:

Calling the listDatasetImportJobs operation

var params = {
  Filters: [
    {
      Condition: IS | IS_NOT, /* required */
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
forecastservice.listDatasetImportJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

    • MaxResults — (Integer)

      The number of items to return in the response.

    • Filters — (Array<map>)

      An array of filters. For each filter, you provide a condition and a match statement. The condition is either IS or IS_NOT, which specifies whether to include or exclude, respectively, from the list, the predictors that match the statement. The match statement consists of a key and a value. In this release, Name is the only valid key, which filters on the DatasetImportJobName property.

      • Condition - IS or IS_NOT

      • Key - Name

      • Value - the value to match

      For example, to list all dataset import jobs named my_dataset_import_job, you would specify:

      "Filters": [ { "Condition": "IS", "Key": "Name", "Value": "my_dataset_import_job" } ]

      • Keyrequired — (String)

        The name of the parameter to filter on.

      • Valuerequired — (String)

        A valid value for Key.

      • Conditionrequired — (String)

        The condition to apply.

        Possible values include:
        • "IS"
        • "IS_NOT"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DatasetImportJobs — (Array<map>)

        An array of objects that summarize each dataset import job's properties.

        • DatasetImportJobArn — (String)

          The Amazon Resource Name (ARN) of the dataset import job.

        • DatasetImportJobName — (String)

          The name of the dataset import job.

        • DataSource — (map)

          The location of the Amazon S3 bucket that contains the training data.

          • S3Configrequired — (map)

            The path to the training data stored in an Amazon Simple Storage Service (Amazon S3) bucket along with the credentials to access the data.

            • Pathrequired — (String)

              The path to an Amazon Simple Storage Service (Amazon S3) bucket or file(s) in an Amazon S3 bucket.

            • RoleArnrequired — (String)

              The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket or file(s).

              Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

            • KMSKeyArn — (String)

              The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

        • Status — (String)

          The status of the dataset import job. The status is reflected in the status of the dataset. For example, when the import job status is CREATE_IN_PROGRESS, the status of the dataset is UPDATE_IN_PROGRESS. States include:

          • ACTIVE

          • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

          • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

        • Message — (String)

          If an error occurred, an informational message about the error.

        • CreationTime — (Date)

          When the dataset import job was created.

        • LastModificationTime — (Date)

          Dependent on the status as follows:

          • CREATE_PENDING - same as CreationTime

          • CREATE_IN_PROGRESS - the current timestamp

          • ACTIVE or CREATE_FAILED - when the job finished or failed

      • NextToken — (String)

        If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDatasets(params = {}, callback) ⇒ AWS.Request

Returns a list of datasets created using the CreateDataset operation. For each dataset, a summary of its properties, including its Amazon Resource Name (ARN), is returned. You can retrieve the complete set of properties by using the ARN with the DescribeDataset operation.

Service Reference:

Examples:

Calling the listDatasets operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
forecastservice.listDatasets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

    • MaxResults — (Integer)

      The number of items to return in the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Datasets — (Array<map>)

        An array of objects that summarize each dataset's properties.

        • DatasetArn — (String)

          The Amazon Resource Name (ARN) of the dataset.

        • DatasetName — (String)

          The name of the dataset.

        • DatasetType — (String)

          The dataset type.

          Possible values include:
          • "TARGET_TIME_SERIES"
          • "RELATED_TIME_SERIES"
          • "ITEM_METADATA"
        • Domain — (String)

          The domain associated with the dataset.

          Possible values include:
          • "RETAIL"
          • "CUSTOM"
          • "INVENTORY_PLANNING"
          • "EC2_CAPACITY"
          • "WORK_FORCE"
          • "WEB_TRAFFIC"
          • "METRICS"
        • CreationTime — (Date)

          When the dataset was created.

        • LastModificationTime — (Date)

          When the dataset is created, LastModificationTime is the same as CreationTime. After a CreateDatasetImportJob operation is called, LastModificationTime is when the import job finished or failed. While data is being imported to the dataset, LastModificationTime is the current query time.

      • NextToken — (String)

        If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listForecastExportJobs(params = {}, callback) ⇒ AWS.Request

Returns a list of forecast export jobs created using the CreateForecastExportJob operation. For each forecast export job, a summary of its properties, including its Amazon Resource Name (ARN), is returned. You can retrieve the complete set of properties by using the ARN with the DescribeForecastExportJob operation. The list can be filtered using an array of Filter objects.

Service Reference:

Examples:

Calling the listForecastExportJobs operation

var params = {
  Filters: [
    {
      Condition: IS | IS_NOT, /* required */
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
forecastservice.listForecastExportJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

    • MaxResults — (Integer)

      The number of items to return in the response.

    • Filters — (Array<map>)

      An array of filters. For each filter, you provide a condition and a match statement. The condition is either IS or IS_NOT, which specifies whether to include or exclude, respectively, from the list, the predictors that match the statement. The match statement consists of a key and a value. In this release, Name is the only valid key, which filters on the ForecastExportJobName property.

      • Condition - IS or IS_NOT

      • Key - Name

      • Value - the value to match

      For example, to list all forecast export jobs named my_forecast_export_job, you would specify:

      "Filters": [ { "Condition": "IS", "Key": "Name", "Value": "my_forecast_export_job" } ]

      • Keyrequired — (String)

        The name of the parameter to filter on.

      • Valuerequired — (String)

        A valid value for Key.

      • Conditionrequired — (String)

        The condition to apply.

        Possible values include:
        • "IS"
        • "IS_NOT"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ForecastExportJobs — (Array<map>)

        An array of objects that summarize each export job's properties.

        • ForecastExportJobArn — (String)

          The Amazon Resource Name (ARN) of the forecast export job.

        • ForecastExportJobName — (String)

          The name of the forecast export job.

        • Destination — (map)

          The path to the S3 bucket where the forecast is stored.

          • S3Configrequired — (map)

            The path to an Amazon Simple Storage Service (Amazon S3) bucket along with the credentials to access the bucket.

            • Pathrequired — (String)

              The path to an Amazon Simple Storage Service (Amazon S3) bucket or file(s) in an Amazon S3 bucket.

            • RoleArnrequired — (String)

              The ARN of the AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket or file(s).

              Cross-account pass role is not allowed. If you pass a role that doesn't belong to your account, an InvalidInputException is thrown.

            • KMSKeyArn — (String)

              The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key.

        • Status — (String)

          The status of the forecast export job. One of the following states:

          • ACTIVE

          • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

          • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

          Note: The Status of the forecast export job must be ACTIVE before you can access the forecast in your Amazon S3 bucket.
        • Message — (String)

          If an error occurred, an informational message about the error.

        • CreationTime — (Date)

          When the forecast export job was created.

        • LastModificationTime — (Date)

          When the last successful export job finished.

      • NextToken — (String)

        If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listForecasts(params = {}, callback) ⇒ AWS.Request

Returns a list of forecasts created using the CreateForecast operation. For each forecast, a summary of its properties, including its Amazon Resource Name (ARN), is returned. You can retrieve the complete set of properties by using the ARN with the DescribeForecast operation. The list can be filtered using an array of Filter objects.

Service Reference:

Examples:

Calling the listForecasts operation

var params = {
  Filters: [
    {
      Condition: IS | IS_NOT, /* required */
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
forecastservice.listForecasts(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

    • MaxResults — (Integer)

      The number of items to return in the response.

    • Filters — (Array<map>)

      An array of filters. For each filter, you provide a condition and a match statement. The condition is either IS or IS_NOT, which specifies whether to include or exclude, respectively, from the list, the predictors that match the statement. The match statement consists of a key and a value. In this release, Name is the only valid key, which filters on the ForecastName property.

      • Condition - IS or IS_NOT

      • Key - Name

      • Value - the value to match

      For example, to list all forecasts named my_forecast, you would specify:

      "Filters": [ { "Condition": "IS", "Key": "Name", "Value": "my_forecast" } ]

      • Keyrequired — (String)

        The name of the parameter to filter on.

      • Valuerequired — (String)

        A valid value for Key.

      • Conditionrequired — (String)

        The condition to apply.

        Possible values include:
        • "IS"
        • "IS_NOT"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Forecasts — (Array<map>)

        An array of objects that summarize each forecast's properties.

        • ForecastArn — (String)

          The ARN of the forecast.

        • ForecastName — (String)

          The name of the forecast.

        • PredictorArn — (String)

          The ARN of the predictor used to generate the forecast.

        • DatasetGroupArn — (String)

          The Amazon Resource Name (ARN) of the dataset group that provided the data used to train the predictor.

        • Status — (String)

          The status of the forecast. States include:

          • ACTIVE

          • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

          • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

          Note: The Status of the forecast must be ACTIVE before you can query or export the forecast.
        • Message — (String)

          If an error occurred, an informational message about the error.

        • CreationTime — (Date)

          When the forecast creation task was created.

        • LastModificationTime — (Date)

          Initially, the same as CreationTime (status is CREATE_PENDING). Updated when inference (creating the forecast) starts (status changed to CREATE_IN_PROGRESS), and when inference is complete (status changed to ACTIVE) or fails (status changed to CREATE_FAILED).

      • NextToken — (String)

        If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPredictors(params = {}, callback) ⇒ AWS.Request

Returns a list of predictors created using the CreatePredictor operation. For each predictor, a summary of its properties, including its Amazon Resource Name (ARN), is returned. You can retrieve the complete set of properties by using the ARN with the DescribePredictor operation. The list can be filtered using an array of Filter objects.

Service Reference:

Examples:

Calling the listPredictors operation

var params = {
  Filters: [
    {
      Condition: IS | IS_NOT, /* required */
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
forecastservice.listPredictors(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

    • MaxResults — (Integer)

      The number of items to return in the response.

    • Filters — (Array<map>)

      An array of filters. For each filter, you provide a condition and a match statement. The condition is either IS or IS_NOT, which specifies whether to include or exclude, respectively, from the list, the predictors that match the statement. The match statement consists of a key and a value. In this release, Name is the only valid key, which filters on the PredictorName property.

      • Condition - IS or IS_NOT

      • Key - Name

      • Value - the value to match

      For example, to list all predictors named my_predictor, you would specify:

      "Filters": [ { "Condition": "IS", "Key": "Name", "Value": "my_predictor" } ]

      • Keyrequired — (String)

        The name of the parameter to filter on.

      • Valuerequired — (String)

        A valid value for Key.

      • Conditionrequired — (String)

        The condition to apply.

        Possible values include:
        • "IS"
        • "IS_NOT"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Predictors — (Array<map>)

        An array of objects that summarize each predictor's properties.

        • PredictorArn — (String)

          The ARN of the predictor.

        • PredictorName — (String)

          The name of the predictor.

        • DatasetGroupArn — (String)

          The Amazon Resource Name (ARN) of the dataset group that contains the data used to train the predictor.

        • Status — (String)

          The status of the predictor. States include:

          • ACTIVE

          • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

          • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

          • UPDATE_PENDING, UPDATE_IN_PROGRESS, UPDATE_FAILED

          Note: The Status of the predictor must be ACTIVE before using the predictor to create a forecast.
        • Message — (String)

          If an error occurred, an informational message about the error.

        • CreationTime — (Date)

          When the model training task was created.

        • LastModificationTime — (Date)

          Initially, the same as CreationTime (status is CREATE_PENDING). Updated when training starts (status changed to CREATE_IN_PROGRESS), and when training is complete (status changed to ACTIVE) or fails (status changed to CREATE_FAILED).

      • NextToken — (String)

        If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDatasetGroup(params = {}, callback) ⇒ AWS.Request

Replaces any existing datasets in the dataset group with the specified datasets.

Note: The Status of the dataset group must be ACTIVE before creating a predictor using the dataset group. Use the DescribeDatasetGroup operation to get the status.

Service Reference:

Examples:

Calling the updateDatasetGroup operation

var params = {
  DatasetArns: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DatasetGroupArn: 'STRING_VALUE' /* required */
};
forecastservice.updateDatasetGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DatasetGroupArn — (String)

      The ARN of the dataset group.

    • DatasetArns — (Array<String>)

      An array of Amazon Resource Names (ARNs) of the datasets to add to the dataset group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.