Step 2: Configuring a solution
Once you complete Step 1: Choosing a recipe, you are ready to configure a solution for training a model.
Configuring a solution allows you customize training so the model meets your specific
business needs. To configure a solution, you specify the dataset group with the data to be used
for training, the recipe to be used for training, and any additional solution parameters and
recipe-specific hyperparameters. If your Interactions training data includes
EVENT_TYPE
and EVENT_VALUE
data, when you configure a solution you
can filter out Interactions data before training.
You can create and configure a solution using the console, AWS Command Line Interface (AWS CLI), or AWS SDK.
Topics
Configuring a solution (console)
To configure a solution in the console, choose the dataset group containing the dataset you'll be using, and then specify a solution name, recipe, and optional recipe specific hyperparameters.
To configure a solution (console)
-
Open the Amazon Personalize console at https://console.aws.amazon.com/personalize/home
and sign in to your account. -
Go to the dataset groups page and choose the dataset group you want to use for training.
-
On the Overview page choose the Create solution button.
-
For Solution name, specify a name for your solution.
-
For Solution type, choose either Item recommendation to get item recommendations for your users, or choose User segmentation to get user segments (groups of users) based on your item data.
-
For Recipe, choose a recipe (see Step 1: Choosing a recipe).
-
In Solution configuration, if your Interactions dataset has EVENT_TYPE or both EVENT_TYPE and EVENT_VALUE columns, optionally use the Event type and Event value threshold fields to choose the interactions data that Amazon Personalize uses when training the model.
For more information see Choosing the interactions data used for training.
-
If you use either the User-Personalization recipe or Personalized-Ranking recipe recipe, optionally specify an Objective and choose an Objective sensitivity to optimize your solution for an objective in addition to relevance. For more information see Optimizing a solution for an additional objective.
-
Configure any hyperparameter options based on your recipe and business needs. Different recipes use different hyperparameters. For the available hyperparameters, see the individual recipes in Step 1: Choosing a recipe.
-
For Tags, optionally add any tags. For more information about tagging Amazon Personalize resources, see Tagging Amazon Personalize resources.
-
Choose Create and train solution. The Dashboard page displays. Proceed to Creating a solution version (console).
Configuring a solution (AWS CLI)
To configure a solution using the AWS CLI use the following create-solution
operation. Specify the solution name
, dataset group arn
, and
recipe arn
.
aws personalize create-solution \ --name
solution name
\ --dataset-group-arndataset group arn
\ --recipe-arnrecipe arn
The solution Amazon Resource Name (ARN) is displayed, for example:
{ "solutionArn": "arn:aws:personalize:<region>:solution/<solution name>" }
You can modify the above code to optimize recipe properties and hyperparameters (see Hyperparameters and HPO) or filter the Interactions data used for training (see Choosing the interactions data used for training).
If you use either the User-Personalization recipe or Personalized-Ranking recipe recipe, you can optimize your solution for an objective in addition to relevance. For more information see Optimizing a solution for an additional objective.
Record the solution ARN for future use and proceed to Creating a solution version (AWS CLI).
Configuring a solution (AWS SDKs)
The following code shows how to create an Amazon Personalize solution using the SDK for Python (Boto3) or SDK for Java 2.x.
You can modify the following code to optimize recipe properties and hyperparameters (see Hyperparameters and HPO) or filter the Interactions data used for training (see Choosing the interactions data used for training). If you use either the User-Personalization recipe or Personalized-Ranking recipe recipe, you can optimize your solution for an objective in addition to relevance. For more information see Optimizing a solution for an additional objective.
Record the solution ARN for future use and proceed to Creating a solution version (AWS SDKs).