Amazon Forecast
Developer Guide

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

GetAccuracyMetrics

Provides metrics on the accuracy of the models that were trained with the CreatePredictor operation. Use metrics to see how well the model did and to decide whether to use the predictor to generate forecasts (with the DeployPredictor operation).

Metrics are only computed on items that have complete data in the range being evaluated.

Metrics include an overall evaluation of the model (for example, p10, p50, and p90 metrics for the model). If you grouped items into categories when you trained the model, the response includes buckets of metrics for each requested category. For example:

  • To forecast a client's electricity usage, you might group the electricity usage field by client location.

  • To forecast item sales, you might group items by color. For example, you might want to know how well blue clothing is selling.

For an example of how to train a model and review metrics, see Getting Started.

Request Syntax

{ "PredictorName": "string", "VersionId": "string" }

Request Parameters

The request accepts the following data in JSON format.

PredictorName

The name of the predictor.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_]+$

Required: Yes

VersionId

The version ID of the predictor.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_]+$

Required: No

Response Syntax

{ "ErrorMetrics": { "Metrics": { "string" : "string" }, "MetricsByBucket": [ { "Bucket": { "string" : "string" }, "BucketItemCount": number, "BucketMetrics": { "string" : "string" } } ] } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ErrorMetrics

Provides information about a model evaluation performed with the CreatePredictor operation.

Type: ErrorMetrics object

Errors

InvalidInputException

The value that you provided was invalid or too long.

HTTP Status Code: 400

ResourceNotFoundException

We can't find that resource. Check the information that you've provided and try again.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: