

 Amazon Forecast 不再提供給新客戶。Amazon Forecast 的現有客戶可以繼續正常使用服務。[進一步了解」](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/)

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# DescribePredictor
<a name="API_DescribePredictor"></a>

**注意**  
 此操作僅適用於使用 CreatePredictor 建立的舊版預測器。如果您未使用舊版預測器，請使用 [DescribeAutoPredictor](API_DescribeAutoPredictor.md)。

描述使用 [CreatePredictor](API_CreatePredictor.md)操作建立的預測器。

**重要**  
Amazon Forecast 不再提供給新客戶。Amazon Forecast 的現有客戶可以繼續正常使用服務。[進一步了解」](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/) 

除了列出`CreatePredictor`請求中提供的屬性之外，此操作還會列出下列屬性：
+  `DatasetImportJobArns` - 用來匯入訓練資料的資料集匯入任務。
+  `AutoMLAlgorithmArns` - 如果執行 AutoML，則會評估演算法。
+  `CreationTime` 
+  `LastModificationTime` 
+  `Status` 
+  `Message` - 如果發生錯誤，請提供錯誤的相關資訊。

## 請求語法
<a name="API_DescribePredictor_RequestSyntax"></a>

```
{
   "PredictorArn": "string"
}
```

## 請求參數
<a name="API_DescribePredictor_RequestParameters"></a>

請求接受採用 JSON 格式的下列資料。

 ** [PredictorArn](#API_DescribePredictor_RequestSyntax) **   <a name="forecast-DescribePredictor-request-PredictorArn"></a>
您希望取得資訊的預測器 Amazon Resource Name (ARN)。  
類型：字串  
長度限制：長度上限為 256。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`  
必要：是

## 回應語法
<a name="API_DescribePredictor_ResponseSyntax"></a>

```
{
   "AlgorithmArn": "string",
   "AutoMLAlgorithmArns": [ "string" ],
   "AutoMLOverrideStrategy": "string",
   "CreationTime": number,
   "DatasetImportJobArns": [ "string" ],
   "EncryptionConfig": { 
      "KMSKeyArn": "string",
      "RoleArn": "string"
   },
   "EstimatedTimeRemainingInMinutes": number,
   "EvaluationParameters": { 
      "BackTestWindowOffset": number,
      "NumberOfBacktestWindows": number
   },
   "FeaturizationConfig": { 
      "Featurizations": [ 
         { 
            "AttributeName": "string",
            "FeaturizationPipeline": [ 
               { 
                  "FeaturizationMethodName": "string",
                  "FeaturizationMethodParameters": { 
                     "string" : "string" 
                  }
               }
            ]
         }
      ],
      "ForecastDimensions": [ "string" ],
      "ForecastFrequency": "string"
   },
   "ForecastHorizon": number,
   "ForecastTypes": [ "string" ],
   "HPOConfig": { 
      "ParameterRanges": { 
         "CategoricalParameterRanges": [ 
            { 
               "Name": "string",
               "Values": [ "string" ]
            }
         ],
         "ContinuousParameterRanges": [ 
            { 
               "MaxValue": number,
               "MinValue": number,
               "Name": "string",
               "ScalingType": "string"
            }
         ],
         "IntegerParameterRanges": [ 
            { 
               "MaxValue": number,
               "MinValue": number,
               "Name": "string",
               "ScalingType": "string"
            }
         ]
      }
   },
   "InputDataConfig": { 
      "DatasetGroupArn": "string",
      "SupplementaryFeatures": [ 
         { 
            "Name": "string",
            "Value": "string"
         }
      ]
   },
   "IsAutoPredictor": boolean,
   "LastModificationTime": number,
   "Message": "string",
   "OptimizationMetric": "string",
   "PerformAutoML": boolean,
   "PerformHPO": boolean,
   "PredictorArn": "string",
   "PredictorExecutionDetails": { 
      "PredictorExecutions": [ 
         { 
            "AlgorithmArn": "string",
            "TestWindows": [ 
               { 
                  "Message": "string",
                  "Status": "string",
                  "TestWindowEnd": number,
                  "TestWindowStart": number
               }
            ]
         }
      ]
   },
   "PredictorName": "string",
   "Status": "string",
   "TrainingParameters": { 
      "string" : "string" 
   }
}
```

## 回應元素
<a name="API_DescribePredictor_ResponseElements"></a>

如果動作成功，則服務傳回 HTTP 200 回應。

服務會傳回下列 JSON 格式的資料。

 ** [AlgorithmArn](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-AlgorithmArn"></a>
用於模型訓練之演算法的 Amazon Resource Name (ARN)。  
類型：字串  
長度限制：長度上限為 256。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`

 ** [AutoMLAlgorithmArns](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-AutoMLAlgorithmArns"></a>
指定 `PerformAutoML` 時，所選演算法的 ARN。  
類型：字串陣列  
長度限制：長度上限為 256。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`

 ** [AutoMLOverrideStrategy](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-AutoMLOverrideStrategy"></a>
 `LatencyOptimized` AutoML 覆寫策略僅適用於私有 Beta 版。請聯絡 AWS Support 或您的客戶經理，以進一步了解 存取權限。
用來訓練預測器的 AutoML 策略。除非指定 `LatencyOptimized` ，否則 AutoML 策略會最佳化預測器準確性。  
此參數僅適用於使用 AutoML 訓練的預測器。  
類型：字串  
有效值:`LatencyOptimized | AccuracyOptimized` 

 ** [CreationTime](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-CreationTime"></a>
建立模型訓練任務時。  
類型：Timestamp

 ** [DatasetImportJobArns](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-DatasetImportJobArns"></a>
資料集匯入任務的 ARNs 陣列，用於匯入預測器的訓練資料。  
類型：字串陣列  
長度限制：長度上限為 256。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`

 ** [EncryptionConfig](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-EncryptionConfig"></a>
Amazon Forecast 可以擔任的 AWS Key Management Service (KMS) 金鑰和 AWS Identity and Access Management (IAM) 角色來存取金鑰。  
類型：[EncryptionConfig](API_EncryptionConfig.md) 物件

 ** [EstimatedTimeRemainingInMinutes](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-EstimatedTimeRemainingInMinutes"></a>
預測器訓練任務的預估剩餘分鐘數。  
類型：Long

 ** [EvaluationParameters](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-EvaluationParameters"></a>
用來覆寫指定演算法的預設評估參數。Amazon Forecast 透過將資料集分割為訓練資料和測試資料來評估預測器。評估參數定義如何執行分割和反覆運算的數量。  
類型：[EvaluationParameters](API_EvaluationParameters.md) 物件

 ** [FeaturizationConfig](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-FeaturizationConfig"></a>
特徵化組態。  
類型：[FeaturizationConfig](API_FeaturizationConfig.md) 物件

 ** [ForecastHorizon](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-ForecastHorizon"></a>
預測的時間步驟數目。預測期間也稱為預測長度。  
類型：整數

 ** [ForecastTypes](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-ForecastTypes"></a>
預測器訓練期間使用的預測類型。預設值為 `["0.1","0.5","0.9"]`   
類型：字串陣列  
陣列成員：項目數下限為 1。項目數上限為 20。  
長度限制：長度下限為 2。長度上限為 4。  
模式：`(^0?\.\d\d?$|^mean$)`

 ** [HPOConfig](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-HPOConfig"></a>
演算法的超參數覆寫值。  
類型：[HyperParameterTuningJobConfig](API_HyperParameterTuningJobConfig.md) 物件

 ** [InputDataConfig](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-InputDataConfig"></a>
描述資料集群組，其中包含用於訓練預測器的資料。  
類型：[InputDataConfig](API_InputDataConfig.md) 物件

 ** [IsAutoPredictor](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-IsAutoPredictor"></a>
預測器是否使用 建立[CreateAutoPredictor](API_CreateAutoPredictor.md)。  
類型：布林值

 ** [LastModificationTime](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-LastModificationTime"></a>
上次修改資源的時間。時間戳記取決於任務的狀態：  
+  `CREATE_PENDING` - `CreationTime`。
+  `CREATE_IN_PROGRESS` - 目前的時間戳記。
+  `CREATE_STOPPING` - 目前的時間戳記。
+  `CREATE_STOPPED` - 任務停止時。
+  `ACTIVE` 或 `CREATE_FAILED` - 任務完成或失敗時。
類型：Timestamp

 ** [Message](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-Message"></a>
如果發生錯誤，則會顯示有關錯誤的資訊訊息。  
類型：字串

 ** [OptimizationMetric](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-OptimizationMetric"></a>
用於最佳化預測器的準確度指標。  
類型：字串  
有效值:`WAPE | RMSE | AverageWeightedQuantileLoss | MASE | MAPE` 

 ** [PerformAutoML](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-PerformAutoML"></a>
預測器是否設定為執行 AutoML。  
類型：布林值

 ** [PerformHPO](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-PerformHPO"></a>
預測器是否設定為執行超參數最佳化 (HPO)。  
類型：布林值

 ** [PredictorArn](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-PredictorArn"></a>
預測器的 ARN。  
類型：字串  
長度限制：長度下限為 1。長度上限為 63。  
模式：`^[a-zA-Z][a-zA-Z0-9_]*`

 ** [PredictorExecutionDetails](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-PredictorExecutionDetails"></a>
為評估預測器準確性而執行之回溯測試的狀態和結果的詳細資訊。您可以指定呼叫 [CreatePredictor](API_CreatePredictor.md)操作時要執行的回溯測試數目。  
類型：[PredictorExecutionDetails](API_PredictorExecutionDetails.md) 物件

 ** [PredictorName](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-PredictorName"></a>
預測器的名稱。  
類型：字串  
長度限制：長度下限為 1。長度上限為 63。  
模式：`^[a-zA-Z][a-zA-Z0-9_]*`

 ** [Status](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-Status"></a>
預測器的狀態。狀態包括：  
+  `ACTIVE` 
+  `CREATE_PENDING`, `CREATE_IN_PROGRESS`, `CREATE_FAILED` 
+  `DELETE_PENDING`, `DELETE_IN_PROGRESS`, `DELETE_FAILED` 
+  `CREATE_STOPPING`, `CREATE_STOPPED` 
預測器`Status`的 必須是 `ACTIVE`，才能使用預測器建立預測。
類型：字串  
長度限制：長度上限為 256。

 ** [TrainingParameters](#API_DescribePredictor_ResponseSyntax) **   <a name="forecast-DescribePredictor-response-TrainingParameters"></a>
在模型訓練期間選取的預設訓練參數或覆寫。使用 CNN-QR 或 DeepAR\$1 執行 AutoML 或選擇 HPO 時，會傳回所選超參數的最佳化值。如需詳細資訊，請參閱[Amazon Forecast 演算法](aws-forecast-choosing-recipes.md)。  
類型：字串到字串映射  
映射項目：最少 0 個項目。項目數上限為 100。  
金鑰長度限制：長度上限為 256。  
金鑰模式：`^[a-zA-Z0-9\-\_\.\/\[\]\,\\]+$`  
值長度限制：長度上限為 256。  
值模式：`^[a-zA-Z0-9\-\_\.\/\[\]\,\"\\\s]+$`

## 錯誤
<a name="API_DescribePredictor_Errors"></a>

 ** InvalidInputException **   
我們無法處理請求，因為它包含無效的值或超過有效範圍的值。  
HTTP 狀態碼：400

 ** ResourceNotFoundException **   
我們找不到具有該 Amazon Resource Name (ARN) 的資源。請檢查 ARN，然後再試一次。  
HTTP 狀態碼：400

## 另請參閱
<a name="API_DescribePredictor_SeeAlso"></a>

如需在其中一種語言特定 AWS SDKs中使用此 API 的詳細資訊，請參閱下列內容：
+  [AWS 命令列界面 V2](https://docs.aws.amazon.com/goto/cli2/forecast-2018-06-26/DescribePredictor) 
+  [AWS 適用於 .NET V4 的 SDK](https://docs.aws.amazon.com/goto/DotNetSDKV4/forecast-2018-06-26/DescribePredictor) 
+  [AWS 適用於 C\$1\$1 的 SDK](https://docs.aws.amazon.com/goto/SdkForCpp/forecast-2018-06-26/DescribePredictor) 
+  [AWS 適用於 Go 的 SDK v2](https://docs.aws.amazon.com/goto/SdkForGoV2/forecast-2018-06-26/DescribePredictor) 
+  [AWS 適用於 Java V2 的 SDK](https://docs.aws.amazon.com/goto/SdkForJavaV2/forecast-2018-06-26/DescribePredictor) 
+  [AWS 適用於 JavaScript V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/forecast-2018-06-26/DescribePredictor) 
+  [AWS 適用於 Kotlin 的 SDK](https://docs.aws.amazon.com/goto/SdkForKotlin/forecast-2018-06-26/DescribePredictor) 
+  [AWS 適用於 PHP V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForPHPV3/forecast-2018-06-26/DescribePredictor) 
+  [AWS 適用於 Python 的 SDK](https://docs.aws.amazon.com/goto/boto3/forecast-2018-06-26/DescribePredictor) 
+  [AWS 適用於 Ruby V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForRubyV3/forecast-2018-06-26/DescribePredictor) 