CreateSolution - Amazon Personalize

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

CreateSolution

Creates the configuration for training a model. トレーニングされたモデルは、ソリューションとも呼ばれます。After the configuration is created, you train the model (create a solution) by calling the CreateSolutionVersion operation. Every time you call CreateSolutionVersion, a new version of the solution is created.

After creating a solution version, you check its accuracy by calling GetSolutionMetrics. When you are satisfied with the version, you deploy it using CreateCampaign. The campaign provides recommendations to a client through the GetRecommendations API.

To train a model, Amazon Personalize requires training data and a recipe. The training data comes from the dataset group that you provide in the request. A recipe specifies the training algorithm and a feature transformation. You can specify one of the predefined recipes provided by Amazon Personalize. Alternatively, you can specify performAutoML and Amazon Personalize will analyze your data and select the optimum USER_PERSONALIZATION recipe for you.

注記

Amazon Personalize doesn't support configuring the hpoObjective for solution hyperparameter optimization at this time.

ステータス

A solution can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

  • DELETE PENDING > DELETE IN_PROGRESS

To get the status of the solution, call DescribeSolution. Wait until the status shows as ACTIVE before calling CreateSolutionVersion.

リクエストの構文

{ "datasetGroupArn": "string", "eventType": "string", "name": "string", "performAutoML": boolean, "performHPO": boolean, "recipeArn": "string", "solutionConfig": { "algorithmHyperParameters": { "string" : "string" }, "autoMLConfig": { "metricName": "string", "recipeList": [ "string" ] }, "eventValueThreshold": "string", "featureTransformationParameters": { "string" : "string" }, "hpoConfig": { "algorithmHyperParameterRanges": { "categoricalHyperParameterRanges": [ { "name": "string", "values": [ "string" ] } ], "continuousHyperParameterRanges": [ { "maxValue": number, "minValue": number, "name": "string" } ], "integerHyperParameterRanges": [ { "maxValue": number, "minValue": number, "name": "string" } ] }, "hpoObjective": { "metricName": "string", "metricRegex": "string", "type": "string" }, "hpoResourceConfig": { "maxNumberOfTrainingJobs": "string", "maxParallelTrainingJobs": "string" } } } }

リクエストパラメータ

リクエストは以下のデータを JSON 形式で受け入れます。

datasetGroupArn

The Amazon Resource Name (ARN) of the dataset group that provides the training data.

タイプ: 文字列

Length Constraints: 最大長は 256 です。

パターン: arn:([a-z\d-]+):personalize:.*:.*:.+

Required: はい

eventType

When your have multiple event types (using an EVENT_TYPE schema field), this parameter specifies which event type (for example, 'click' or 'like') is used for training the model.

If you do not provide an eventType, Amazon Personalize will use all interactions for training with equal weight regardless of type.

タイプ: 文字列

Length Constraints: 最大長は 256 です。

Required: いいえ

name

The name for the solution.

タイプ: 文字列

Length Constraints: 最小長は 1 です。 最大長は 63 です。

パターン: ^[a-zA-Z0-9][a-zA-Z0-9\-_]*

Required: はい

performAutoML

Whether to perform automated machine learning (AutoML). デフォルト: false。For this case, you must specify recipeArn.

When set to true, Amazon Personalize analyzes your training data and selects the optimal USER_PERSONALIZATION recipe and hyperparameters. In this case, you must omit recipeArn. Amazon Personalize determines the optimal recipe by running tests with different values for the hyperparameters. AutoML lengthens the training process as compared to selecting a specific recipe.

タイプ: ブール値

Required: いいえ

performHPO

Whether to perform hyperparameter optimization (HPO) on the specified or selected recipe. デフォルト: false

When performing AutoML, this parameter is always true and you should not set it to false.

タイプ: ブール値

Required: いいえ

recipeArn

The ARN of the recipe to use for model training. Only specified when performAutoML is false.

タイプ: 文字列

Length Constraints: 最大長は 256 です。

パターン: arn:([a-z\d-]+):personalize:.*:.*:.+

Required: いいえ

solutionConfig

The configuration to use with the solution. When performAutoML is set to true, Amazon Personalize only evaluates the autoMLConfig section of the solution configuration.

注記

Amazon Personalize doesn't support configuring the hpoObjective at this time.

タイプ: SolutionConfig オブジェクト

Required: いいえ

レスポンスの構文

{ "solutionArn": "string" }

レスポンス要素

アクションが成功すると、サービスは HTTP 200 レスポンスを返します。

サービスから以下のデータが JSON 形式で返されます。

solutionArn

The ARN of the solution.

タイプ: 文字列

Length Constraints: 最大長は 256 です。

パターン: arn:([a-z\d-]+):personalize:.*:.*:.+

Errors

InvalidInputException

Provide a valid value for the field or parameter.

HTTP Status Code: 400

LimitExceededException

The limit on the number of requests per second has been exceeded.

HTTP Status Code: 400

ResourceAlreadyExistsException

The specified resource already exists.

HTTP Status Code: 400

ResourceInUseException

The specified resource is in use.

HTTP Status Code: 400

ResourceNotFoundException

Could not find the specified resource.

HTTP Status Code: 400

以下の資料も参照してください。

言語固有の AWS SDK のいずれかでこの API を使用する方法の詳細については、以下を参照してください。