HRNN recipe (legacy)
Note
Legacy HRNN recipes are no longer available. This documentation is for reference purposes.
We recommend using the aws-user-personalizaton (User-Personalization) recipe over the legacy HRNN recipes. User-Personalization improves upon and unifies the functionality offered by the HRNN recipes. For more information, see User-Personalization recipe.
The Amazon Personalize hierarchical recurrent neural network (HRNN) recipe models changes in user behavior to provide recommendations during a session. A session is a set of user interactions within a given timeframe with a goal of finding a specific item to fill a need, for example. By weighing a user's recent interactions higher, you can provide more relevant recommendations during a session.
HRNN accommodates user intent and interests, which can change over time. It takes ordered user histories and automatically weights them to make better inferences. HRNN uses a gating mechanism to model the discount weights as a learnable function of the items and timestamps.
Amazon Personalize derives the features for each user from your dataset. If you have done real-time
data integration, these features are updated in real time according to user activity. To get a
recommendation, you provide only the USER_ID
. If you also provide an
ITEM_ID
, Amazon Personalize ignores it.
The HRNN recipe has the following properties:
-
Name –
aws-hrnn
-
Recipe Amazon Resource Name (ARN) –
arn:aws:personalize:::recipe/aws-hrnn
-
Algorithm ARN –
arn:aws:personalize:::algorithm/aws-hrnn
-
Feature transformation ARN –
arn:aws:personalize:::feature-transformation/JSON-percentile-filtering
-
Recipe type –
USER_PERSONALIZATION
The following table describes the hyperparameters for the HRNN recipe. A hyperparameter is an algorithm parameter that you can adjust to improve model performance. Algorithm hyperparameters control how the model performs. Featurization hyperparameters control how to filter the data to use in training. The process of choosing the best value for a hyperparameter is called hyperparameter optimization (HPO). For more information, see Hyperparameters and HPO.
The table also provides the following information for each hyperparameter:
-
Range: [lower bound, upper bound]
-
Value type: Integer, Continuous (float), Categorical (Boolean, list, string)
-
HPO tunable: Can the parameter participate in HPO?
Name | Description |
---|---|
Algorithm hyperparameters | |
hidden_dimension |
The number of hidden variables used in the model. Hidden
variables recreate users' purchase history and item statistics to
generate ranking scores. Specify a greater number of hidden dimensions when your
Item interactions dataset includes more complicated patterns. Using more hidden dimensions
requires a larger dataset and more time to process. To decide on the optimal value,
use HPO. To use HPO, set Default value: 43 Range: [32, 256] Value type: Integer HPO tunable: Yes |
bptt |
Determines whether to use the back-propagation through time technique. Back-propagation through time is a technique that updates
weights in recurrent neural network-based algorithms. Use Default value: 32 Range: [2, 32] Value type: Integer HPO tunable: Yes |
recency_mask |
Determines whether the model should consider the latest popularity trends in the
Item interactions dataset. Latest popularity trends might include sudden changes in the
underlying patterns of interaction events. To train a model that places more weight on
recent events, set Default value: Range: Value type: Boolean HPO tunable: Yes |
Featurization hyperparameters | |
min_user_history_length_percentile |
The minimum percentile of user history lengths to include in model training.
History length is the total amount of data about
a user. Use For example, setting Default value: 0.0 Range: [0.0, 1.0] Value type: Float HPO tunable: No |
max_user_history_length_percentile |
The maximum percentile of user history lengths to include in model training.
History length is the total amount of data about
a user. Use For example, setting Default value: 0.99 Range: [0.0, 1.0] Value type: Float HPO tunable: No |