CreateSolution : algorithmHyperParameters vs algorithmHyperParameterRanges

0

When we use CreateSolution, what is the difference between algorithmHyperParameters and algorithmHyperParameterRanges?

In the documentation, it says that in algorithmHyperParameterRanges we should specify the hyperparameters and their allowable ranges and for algorithmHyperParameters we should list the hyperparameter names and ranges. How are they different and when do we use what? Can you please provide an example?

Thank you!

질문됨 2년 전205회 조회
1개 답변
1

algorithmHyperparameters allows you to specify exact values for the hyperparameters, whereas algorithmHyperParameterRanges is used during hyperparameter optimization to set the range for the hyperparameters you want to optimize. The example below (taken from this page of the documentation) shows the difference. The hidden_dimension variable is set to an exact value of 55 using algorithmHyperParameters. The bptt variable is set to be an integer value between 20 and 40 using algorithmHyperParameterRanges under hpoConfig - the exact value will be determined during hyperparameter optimization. Note that performHPO must be set to true to activate the optimization process. The example also shows how to handle a boolean variable for optimization through the recency_mask variable, and continuous variables are also supported.

{
  "performAutoML": false,
  "recipeArn": "arn:aws:personalize:::recipe/aws-hrnn",
  "performHPO": true,
  "solutionConfig": {
      "algorithmHyperParameters": {
          "hidden_dimension": "55"
      },
      "hpoConfig": {
          "algorithmHyperParameterRanges": {
              "categoricalHyperParameterRanges": [
                  {
                      "name": "recency_mask",
                      "values": [ "true", "false" ]
                  }
              ],
              "integerHyperParameterRanges": [
                  {
                      "name": "bptt",
                      "minValue": 20,
                      "maxValue": 40
                  }
              ]
          },
          "hpoResourceConfig": {
              "maxNumberOfTrainingJobs": "4",
              "maxParallelTrainingJobs": "2"
          }
      }
  }
}
AWS
S_Moose
답변함 2년 전
  • Okay, got it. Thank you for the clarification!

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠