To configure a Workflow for Amazon Personalize, you will need to:

  1. Create a new workflow and set a trigger schedule.
  2. Map your data from your Redshift table to the Personalize datasets 
  3. Configure the model training parameters (see below)
  4. Deploy an API endpoint 

Application steps are used to configure the model training process for Amazon Personalize.

This article explains how to configure an Application Step for Amazon Personalize.


Contents


Step Configuration

From your workflow, add an Application Block step and then configure it using the following guide.


Input dataset group

This is a list of input data step groups that have been created in the workflow that can be used for training models.

Once selected, the system detects the application based on the dataset and shows the applicable application configuration.

The system adds the data input step as a default dependency that cannot be removed.


Recipes

Amazon Personalize provides recipes, based on common use cases, for training models. 

When configuring the Amazon Personalize application, the following four recipes are available from the  Recipe drop-down:


Enable Hyperparameter Optimization (HPO)

Hyperparameters are model parameters that have to be specified while training a model.

See below for how to configure them.


Retrain Model

From here, you can schedule the frequency at which to automatically retrain the model on the full dataset.

This setting is related to the Input data collection frequency.

If you configure data collection frequency as ‘daily’ and set the forecast horizon to 7, the system will generate the daily forecast for the next 7 days.


Dependency

This lists all of the other steps within the workflow.

Select any steps that must be successfully run before this step can run.



Configuring Recipe Hyperparameters

Hyperparameters are model parameters that have to be specified while training a model.

Hyperparameter optimization (HPO), or tuning, is the task of choosing optimal hyperparameters for a specific learning objective. The optimal hyperparameters are determined by running many training jobs using different values from the specified ranges of possibilities.

You can specify hyperparameters and enable HPO for the following recipes:


Personalized Ranking Hyperparameters

The Personalized-Ranking recipe is a hierarchical recurrent neural network (HRNN) recipe that also can filter and re-rank results. Personalized-Ranking provides a list of the best recommendations.

Use the Personalized-Ranking recipe when you’re personalizing the results for your users, such as personalized re-ranking of search results or curated lists.


To train a model, the Personalized-Ranking recipe uses the Interactions dataset from a dataset group. A dataset group is a set of related datasets, which can include the Users, Items, and Interactions datasets.


Further information: Native Recipe Search - Amazon Personalize Documentation


You can configure the following hyperparameters for the Personalize-Ranking recipe from the Application Step Advanced Configuration parameters:


Hyperparameter Optimization (HPO)

This is only available if the Hyperparameter Optimization (HPO) flag has been set.


Algorithm Hyperparameters


The following table describes the Algorithm hyperparameters for the Personalized-Ranking recipe:


Parameter Name

Range
[lower bound, upper bound]

Type

Tune with HPO?

Description

hidden_dimension

Default value: 149

Range: [32, 256]

Integer

Yes

The parameter generates ranking scores by recreating a user’s purchase history and item statistics.

bptt

Default value: 32

Range: [2, 32]

Integer

Yes

Back-propagation through time is a technique that updates weights in recurrent neural network-based algorithms. Use bptt for long-term credits to connect delayed rewards to early events.

recency_mask

Default value: True
Range: True or False

Boolean

Yes

Determines whether the model should consider the latest popularity trends in the Interactions dataset. 


Featurization Hyperparameters

The following table describes the Featurization hyperparameters for the Personalized-Ranking recipe:


Parameter Name

Range
[lower bound, upper bound]

Type

Tune with HPO?

Description

min_user_history_length_percentile

Default value: 0.0

Range: [0.0, 1.0]

Float

No

History length is the total amount of data about a user.

Use these parameters to exclude a percentage of users with short history lengths.

max_user_history_length_percentile

Default value: 0.99

Range: [0.0, 1.0]

Float

No


SIMS Hyperparameters

The Item-to-item similarities (SIMS) recipe uses collaborative filtering to recommend items that are most similar to an item you specify when you get recommendations.

SIMS uses your Interactions dataset, not item metadata such as colour or price, to determine similarity.


SIMS identifies the co-occurrence of the item in user histories in your Interaction dataset to recommend similar items. For example, with SIMS Amazon Personalize could recommend coffee shop items customers frequently bought together or movies that different users also watched.


You can configure the following hyperparameters for the SIMS recipe from the Application Step Advanced Configuration parameters:


Hyperparameter Optimization (HPO)

This is only available if the Hyperparameter Optimization (HPO) flag has been set.


Algorithm Hyperparameters

The following table describes the Algorithm hyperparameters for the User-Personalization recipe:

Parameter Name

Range
[lower bound, upper bound]

Type

Tune with HPO?

Description

popularity_discount_factor

Default value: 0.5

Range: [0.0, 1.0]

Float

Yes

Affects the balance between popularity and correlation when you calculate similarity. 

min_cointeraction_count

Default value: 3

Range: [0,10]

Integer

Yes

The minimum number of co-interactions you need to calculate the similarity between a pair of items.



Featurization Hyperparameters

The following table describes the Featurization hyperparameters for the User-Personalization recipe:

Parameter Name

Range
[lower bound, upper bound]

Type

Tune with HPO?

Description

min_user_history_length_percentile

Default value: 0.005

Range: [0.0, 1.0]

Float

No

The minimum percentile of item interaction counts to include in model training.

max_user_history_length_percentile

Default value: 0.995

Range: [0.0, 1.0]

Float

No

The maximum percentile of item interaction counts to include in model training.


User Personalization Hyperparameters

The User-Personalization recipe is optimized for all personalized recommendation scenarios. It predicts the items that a user will interact with based on Interactions, Items, and Users datasets.


Further information: Native Recipe Search - Amazon Personalize Documentation


You can configure the following hyperparameters for the User-Personalization recipe from the Application Step Advanced Configuration parameters:


Hyperparameter Optimization (HPO)

This is only available if the Hyperparameter Optimization (HPO) flag has been set.

Algorithm Hyperparameters

The following table describes the Algorithm hyperparameters for the User-Personalization recipe:


Parameter Name

Range
[lower bound, upper bound]

Type

Tune with HPO?

Description

hidden_dimension

Default value: 149

Range: [32, 256]

Integer

Yes

The parameter generates ranking scores by recreating a user’s purchase history and item statistics.

bptt

Default value: 32

Range: [2, 32]

Integer

Yes

Back-propagation through time is a technique that updates weights in recurrent neural network-based algorithms. Use bptt for long-term credits to connect delayed rewards to early events.

recency_mask

Default value: True
Range: True or False

Boolean

Yes

Determines whether the model should consider the latest popularity trends in the Interactions dataset. 


Featurization Hyperparameters


The following table describes the Featurization hyperparameters for the User-Personalization recipe:


Parameter Name

Range
[lower bound, upper bound]

Type

Tune with HPO?

Description

min_user_history_length_percentile

Default value: 0.0

Range: [0.0, 1.0]

Float

No

History length is the total amount of data about a user.

Use these parameters to exclude a percentage of users with short history lengths.

max_user_history_length_percentile

Default value: 0.99

Range: [0.0, 1.0]

Float

No