Algorithms

Amazon Personalize provides recipes, based on common use cases, for training models. A recipe is an Amazon Personalize term specifying an appropriate algorithm to train for a given use case. With recipes, you can create a personalization system without prior machine learning experience.

Amazon Personalize recipes use the following during training:

  • Predefined attributes of your data
  • Predefined feature transformations
  • Predefined algorithms
  • Initial parameter settings for the algorithms

To optimize your model, you can override many of these parameters when you create a solution. For more information, see Hyperparameters and HPO.

Choose a specific recipe based on what you want to accomplish and how familiar you are with the recipes. Each recipe is designed for a specific use case. When creating a solution, choose the recipe that best fits your needs.

Amazon Personalize Recipes

Amazon Personalize provides three types of recipes. Besides behavioral differences, each type has different requirements for getting recommendations, as shown in the following table.

Recipe type API Requirements Recipes
USER_PERSONALIZATION GetRecommendations userId: Required User-Personalization Popularity-Count
PERSONALIZED_RANKING GetPersonalizedRanking userId: Required inputList: list of itemId’s Personalized-Ranking
RELATED_ITEMS GetRecommendations itemId: Required SIMS

In your notebook you will be creating your soultions using the following commands:

personalize.list_recipes()

user_personalization_recipe_arn = "arn:aws:personalize:::recipe/aws-user-personalization"

user_personalization_create_solution_response = personalize.create_solution(
    name = "personalize-immersion-day-userpersonalization",
    datasetGroupArn = dataset_group_arn,
    recipeArn = user_personalization_recipe_arn
)

user_personalization_solution_arn = user_personalization_create_solution_response['solutionArn']

print(json.dumps(user_personalization_solution_arn, indent=2))

userpersonalization_create_solution_version_response = personalize.create_solution_version(
    solutionArn = user_personalization_solution_arn
)

userpersonalization_solution_version_arn = userpersonalization_create_solution_version_response['solutionVersionArn']

print(json.dumps(user_personalization_create_solution_response, indent=2))

To get information about a recipe using the SDK for Python (Boto3), call the DescribeRecipe API. To get information about a recipe using the AWS CLI, use the following command.