Parameters for Supported Strategies
RES supports multiple strategies. This section describes the retrieval and ranking strategies. Table 1 describes the strategy parameters.
| Strategy | Name | Algorithm |
|---|---|---|
| Retrieval | SpecificBehavior | |
| BehaviorsWeight | ||
| ItemCF | ||
| UserCF | ||
| AlsCF | ||
| HistoryBehaviorMemory | ||
| ManualInput | ||
| Ranking | LR | |
| FM | ||
| FFM | ||
| DEEPFM | ||
| PIN |
Recommendation Based on Specific Behavior Popularity
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| data_source_config | Yes | JSON | Data source configuration. For details, see Table 3. |
| algorithm_config | Yes | JSON | Algorithm configuration |
| candidate_set_config | Yes | JSON | Candidate set configuration. For details, see Table 4. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| behavior_type | Yes | String | Behavior types:
|
| start_time | Configure either this parameter or retain_day. | long | Start time of user behavior. This parameter coexists with end_time. |
| end_time | Configure either this parameter or retain_day. | long | End time of user behavior. This parameter coexists with start_time. |
| retain_day | Configure either this parameter or start_time. | Integer | Time span during which user behavior data can be retained. The value is an integer ranging from 1 to 10,000. |
Recommendation Based on Comprehensive Behavior Popularity
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| data_source_config | Yes | JSON | Data source configuration. For details, see Table 6. |
| algorithm_config | Yes | JSON | Algorithm configuration |
| candidate_set_config | Yes | JSON | Candidate set configuration. For details, see Table 8. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| behavior_weights | Yes | List | Behavior weight. For details, see Table 7. |
| start_time | Configure either this parameter or retain_day. | long | Start time of a user behavior. This parameter coexists with end_time. |
| end_time | Configure either this parameter or retain_day. | long | End time of a user behavior. This parameter coexists with start_time. |
| retain_day | Configure either this parameter or start_time. | Integer | Time span during which user behavior data can be retained. The value is an integer ranging from 1 to 10,000. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| behavior_type | Yes | String | Behavior types:
|
| weight | Yes | Double | Weight. Value range: (0, 1]. Only one digit is allowed after the decimal point. |
ItemCF Recommendation
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| data_source_config | Yes | JSON | Data source configuration. For details, see Table 10. |
| algorithm_config | Yes | JSON | Algorithm configuration. For details, see Table 11. |
| candidate_set_config | Yes | JSON | Candidate set configuration. For details, see Table 12. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| retain_days | Yes | Integer | Time span during which user behavior data can be retained. The value is an integer ranging from 1 to 10,000. |
| behavior_weights | Yes | List | Behavior weight (excluding behavior uncollect and behavior dislike). For details, see Table 7. |
UserCF Recommendation
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| data_source_config | Yes | JSON | Data source configuration. For details, see Table 14. |
| algorithm_config | Yes | JSON | Algorithm configuration. For details, see Table 15. |
| candidate_set_config | Yes | JSON | Candidate set configuration. For details, see Table 16. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| retain_days | Yes | Integer | Time span during which user behavior data can be retained. The value is an integer ranging from 1 to 10,000. |
| behavior_weights | Yes | List | Behavior weight (excluding behavior uncollect and behavior dislike). For details, see Table 7. |
ALS-based MF Recommendation
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| data_source_config | Yes | JSON | Data source configuration. For details, see Table 18. |
| algorithm_config | Yes | JSON | Algorithm configuration. For details, see Table 19. |
| candidate_set_config | Yes | JSON | Candidate set configuration |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| retain_days | Yes | Integer | Time span during which user behavior data can be retained. The value is an integer ranging from 1 to 10,000. |
| behavior_weights | Yes | List | Behavior weight. For details, see Table 7. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| implicit_vector_rank | Yes | Integer | Implicit vector. The value is an integer ranging from 1 to 1000. |
| max_iterator_num | Yes | Integer | Maximum number of iterations. The value is an integer ranging from 1 to 2000 (excluding 2000). |
| regular_param | Yes | Double | Regular coefficient. The value must be greater than 0 and less than or equal to 1, with a maximum of eight decimal places reserved. |
Business Rule - Historical Behavior-based Recommendation
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| data_source_config | Yes | JSON | Data source configuration. For details, see Table 21. |
| algorithm_config | Yes | JSON | Algorithm configuration. For details, see Table 22. |
| candidate_set_config | Yes | JSON | Candidate set configuration |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| retain_days | Yes | Integer | Time span during which user behavior data can be retained. The value is an integer ranging from 1 to 10,000. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| history_behavior_memories | Yes | List | Historical behavior. For details, see Table 23. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| behavior_type | Yes | String | Behavior types:
|
| least_intension | Yes | Integer | Minimum strength. The value is an integer ranging from 1 to 100. |
Manual Input-Based Candidate Set Generation
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| data_source_config | Yes | JSON | Data source configuration |
| algorithm_config | Yes | JSON | Algorithm configuration. For details, see Table 25. |
| candidate_set_config | Yes | JSON | Candidate set configuration |
Recommendation Based on Attribute Matching
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| portrait_storage | Yes | JSON | Profile storage information. For details, see Table 27. |
| global_features_information_path | Yes | String | Global feature file |
| match_feature_pairs | Yes | List | Pair of attributes to be matched. For details, see Table 30. |
| recommended_number | Yes | Integer | Number of output recommendations. The value is an integer ranging from 1 to 1000. |
| row | Yes | Integer | Number of buckets in one group |
| band | Yes | Integer | Number of bucket groups |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| item_profile_storage | Yes | JSON | Item profile storage information. For details, see Table 28. |
| user_profile_storage | Yes | JSON | User profile storage information. For details, see Table 28. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| platform | Yes | String | Platform name. Currently, only CloudTable is supported. |
| platform_parameter | Yes | JSON | Storage platform parameter. For details, see Table 29. |
Logistic Regression
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| fields_feature_size_path | Yes | String | File that identifies the number of features in each field. This file is generated by the ranking data processing API and is saved in the fields_feature_size directory under Result Save Path. The file is named part-00000. A complete file path is required. |
| max_iterations | Yes | Int | Maximum number of model training iterations The value range ranges from 1 to 1000. |
| early_stop_iterations | Yes | Int | Parameter that indicates when the AUC of consecutive early_stop_iterations in a test set is smaller than the current optimal AUC, the iteration stops and the training ends. The value range ranges from 1 to 1000 and cannot be greater than that of max_iterations. |
| initial_parameters | Yes | JSON | Initialization parameter. For details, see Table 32. Example: { "initial_method":"normal","mean_value": 0, "standard_deviation":0.001 } |
| optimize_parameters | Yes | JSON | Optimization parameter. For details, see Table 33. Example: { "type": "adam", "epsilon": 1e-08, "learning_rate": 0.001 } |
| regular_parameters | Yes | JSON | Regular parameter. For details, see Table 34. Example: { "l2_regularization":0.001, "regular_loss_compute_mode":"full" } |
| algorithm_specify_parameters | Yes | JSON | - |
| Parameter | Mandatory | Type | Description | |
|---|---|---|---|---|
| normal | mean_value | Yes | Double | Mean value of normal. The value ranges from -1 to 1. The default value is 0. |
| standard_deviation | Yes | Double | Standard deviation of normal. The value ranges from 0 to 1. The default value is 0.001. | |
| uniform | min_value | Yes | Double | Minimum value of uniform The value must be less than that of max_value. The value is equal to or greater than -1 but less than 0. The default value is -0.001. |
| max_value | Yes | Double | Maximum value of uniform. The value must be greater than that of min_value. The value ranges from 0 (0 is excluded) to 1. The default value is 0.001. | |
| xavier | N/A | Yes | N/A | The initial weight of the neuron is initialized to a uniform (Gaussian or random) distribution with a mean value of 0 and variance of Var(wi) = 1/nin, where nin is the number of inputs of the neuron. |
| Parameter | Mandatory | Type | Description | |
|---|---|---|---|---|
| grad | learning_rate | Yes | Double | Hyper-parameter that controls the step size of the optimizer in the optimization direction The value ranges from 0 (0 is excluded) to 1. The default value is 0.001. |
| adagrad | initial_accumulator_value | Yes | Double | Parameter that can adjust the learning step dynamically The value ranges from 0 (0 is not included) to 1. The default value is 0.1. |
| learning_rate | Yes | Double | Hyper-parameter that controls the step size of the optimizer in the optimization direction The value ranges from 0 (0 is excluded) to 1. The default value is 0.001. | |
| adam | epsilon | Yes | Double | Small constant that is used to ensure the value stability The value ranges from 0 (0 is excluded) to 1. The default value is 1.00E-08. |
| learning_rate | Yes | Double | Hyper-parameter that controls the step size of the optimizer in the optimization direction The value ranges from 0 (0 is excluded) to 1. The default value is 0.001. | |
| ftrl | initial_accumulator_value | Yes | Double | Parameter that can adjust the learning step dynamically The value ranges from 0 (0 is not included) to 1. The default value is 0.1. |
| lambda1 | Yes | Double | Overlaid on the norm (x, 1) of the model and used to limit the model value to prevent overfitting. The value ranges from 0 to 1. The default value is 0. | |
| lambda2 | Yes | Double | Overlaid on the norm (x, 2) of the model and used to limit the model value to prevent overfitting. The value ranges from 0 to 1. The default value is 0. | |
| learning_rate | Yes | Double | Hyper-parameter that controls the step size of the optimizer in the optimization direction The value ranges from 0 (0 is not included) to 1. The default value is 0.1. | |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| l2_regularization | Yes | Double | Overlaid on the norm (x, 2) of the model and used to limit the model value to prevent overfitting. The value ranges from 0 to 1. The default value is 0. |
| regular_loss_compute_mode | Yes | enum | Calculation mode for regular loss. full indicates that all parameters are calculated. batch indicates that only parameters of the current batch data are calculated. The calculation speed in batch mode is faster than that in full mode. The default value is full. |
Factorization Machine
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| fields_feature_size_path | Yes | String | File that identifies the number of features in each field. This file is generated by the API that processes ranking data and is saved in the fields_feature_size directory under the run_path path. The file is named part-00000. Full path of the file is required. |
| max_iterations | Yes | Int | Maximum number of model training iterations The value range ranges from 1 to 1000. |
| early_stop_iterations | Yes | Int | Parameter that indicates when the AUC of consecutive early_stop_iterations in a test set is smaller than the current optimal AUC, the iteration stops and the training ends. The value range ranges from 1 to 1000 and cannot be greater than that of max_iterations. |
| algorithm_specify_parameters | Yes | JSON | Algorithm parameter. For details, see Table 36. Example: { "latent_vector_length":10 } |
| initial_parameters | Yes | JSON | Initialization parameter. For details, see Table 32. Example: { "initial_method": "normal", "mean_value": 0.0; "standard_deviation": 0.001 } |
| optimize_parameters | Yes | JSON | Optimization parameter. For details, see Table 33. Example: { "type": "adam", "epsilon": 1e-08, "learning_rate": 0.001 } |
| regular_parameters | Yes | JSON | Regular parameter. For details, see Table 34. Example: { "l2_regularization":0.001, "regular_loss_compute_mode":"full" } |
Field-aware Factorization Machine
Factorization Machine describes the details about algorithm_parameters.
Deep Network Factorization Machine
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| fields_feature_size_path | Yes | String | File that identifies the number of features in each field. This file is generated by the API that processes ranking data and is saved in the fields_feature_size directory under the run_path path. The file is named part-00000. Full path of the file is required. |
| max_iterations | Yes | Int | Maximum number of model training iterations The value range ranges from 1 to 1000. |
| early_stop_iterations | Yes | Int | Parameter that indicates when the AUC of consecutive early_stop_iterations in a test set is smaller than the current optimal AUC, the iteration stops and the training ends. The value range ranges from 1 to 1000 and cannot be greater than that of max_iterations. |
| algorithm_specify_parameters | Yes | JSON | Algorithm parameter. For details, see Table 38. Example: { "latent_vector_length":10 "architecture":[400,400,400] "value_keep_probability":0.8 "active_function": "reul" } |
| initial_parameters | Yes | JSON | Initialization parameter. For details, see Table 32. Example: { "initial_method": "normal" "mean_value": 0.0 "standard_deviation": 0.001 } |
| optimize_parameters | Yes | JSON | Optimization parameter. For details, see Table 33. Example: { "type": "adam", "epsilon": 1e-08, "learning_rate": 0.001 } |
| regular_parameters | Yes | JSON | Regular parameter. For details, see Table 34. Example: { "l2_regularization":0.001, "regular_loss_compute_mode":"full" } |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| latent_vector_length | Yes | Int | Length of the decomposed feature vector The value ranges from 1 and 100, and the default value is 10. |
| architecture | Yes | List[Int] | Number of neural network layers/neuron nodes at each layer The number of neuron nodes at each layer is not greater than 5000, and the number of neural network layers is not greater than 10. Neural Network Structure is set to 400,400,400 by default. |
| value_keep_probability | Yes | Double | Probability that the value of a neuron is kept during neural network forwarding. The value range is greater than 0 and equal to or less than 1. The default value is 0.8. |
| active_function | Yes | Enum | Parameter that maps a value of a neuron or a group of neurons to an output value. The options are relu, sigmoid, and tanh. The default value is relu. |
Product-network In Network
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| fields_feature_size_path | Yes | String | File that identifies the number of features in each field. This file is generated by the API that processes ranking data and is saved in the fields_feature_size directory under the run_path path. The file is named part-00000. Full path of the file is required. |
| max_iterations | Yes | Int | Maximum number of model training iterations The value ranges from 1 to 1000. The default value is 50. |
| early_stop_iterations | Yes | Int | Parameter that indicates when the AUC of consecutive early_stop_iterations in a test set is smaller than the current optimal AUC, the iteration stops and the training ends. The value range ranges from 1 to 1000 and cannot be greater than that of max_iterations. The default value is 5. |
| algorithm_specify_parameters | Yes | JSON | Algorithm parameter. For details, see Table 40. Example: { "latent_vector_length":10, "active_function":"relu", "architecture":[400,400,400], "value_keep_probability":0.8, "sub_net_architecture":[40,5], "is_drop_fm":"False" } |
| initial_parameters | Yes | JSON | Initialization parameter. For details, see Table 32. Example: { "initial_method": "xavier" } |
| optimize_parameters | Yes | JSON | Optimization parameter. For details, see Table 33. Example: { "type": "adam", "epsilon": 1e-08, "learning_rate": 0.001 } |
| regular_parameters | Yes | JSON | Regular parameter. For details, see Table 34. Example: { "l2_regularization":0.001, "regular_loss_compute_mode":"full" } |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| latent_vector_length | Yes | Int | Length of the decomposed feature vector The value ranges from 1 and 100, and the default value is 10. |
| architecture | Yes | List[Int] | Number of neural network layers/neuron nodes at each layer The number of neuron nodes at each layer ranges from 1 to 1000, and the number of neural network layers is not greater than 5. Neural Network Structure is set to 400,400,400 by default. |
| value_keep_probability | Yes | Double | Probability that the value of a neuron is kept during neural network forwarding. The value range is greater than 0 and equal to or less than 1. The default value is 0.8. |
| active_function | Yes | Enum | Parameter that maps a value of a neuron or a group of neurons to an output value The options are relu, sigmoid, and tanh. The default value is relu. |
| sub_net_architecture | Yes | List[Int] | Architecture of a neural network whose kernels are used to calculate the relationships between feature vectors The number of nodes at each layer ranges from 1 to 100, and the number of layers is not greater than 5. 40 and 5 are set by default. |
| is_drop_fm | Yes | Boolean | Whether to remove the factorization machine from the model architecture. If the value is True, the component is transformed into a DNN with a kernel function. The options are true and false. The default value is false. |
Last Article: Viewing Global Feature File Configurations
Next Article: Terminating Operators
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.