

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 AutoML 选择 HRNN 食谱（仅限 API）
AutoML 和旧版配方

Amazon Personalize 可以根据其输入数据的分析自动选择最合适的分层递归神经网络 (HRNN) 食谱。该选项称为 AutoML。要执行 AutoML，请在调用 [CreateSolution](API_CreateSolution.md) API 时将 `performAutoML` 参数设置为 `true`。

您还可以指定 Amazon Personalize 检查的食谱列表，以根据您指定的指标决定最佳食谱。在这种情况下，您调用 `CreateSolution` 操作，为 `performAutoML` 参数指定 `true`，忽略 `recipeArn` 参数，包含 `solutionConfig` 参数，并指定 `metricName` 和 `recipeList` 作为 `autoMLConfig` 对象的一部分。

下表显示了选择配方的方式。必须指定 `performAutoML` 或 `recipeArn`，但不能同时指定二者。仅使用 HRNN 配方执行 AutoML。


| performAutoML | recipeArn | solutionConfig | 结果 | 
| --- | --- | --- | --- | 
| true | 忽略 | 已忽略 | Amazon Personalize 选择食谱 | 
| true | 忽略 | autoMLConfig：指定了 metricName 和 recipeList | Amazon Personalize 从列表中选择优化指标的食谱 | 
| 忽略 | 满足指定 | 已忽略 | 您指定配方 | 
| 忽略 | 满足指定 | 满足指定 | 您指定配方并覆盖默认训练属性 | 

**注意**  
当 `performAutoML` 为 `true` 时，将忽略 `solutionConfig` 对象的所有参数，`autoMLConfig` 除外。