You work for a software company that produces online sports betting app.
You are on the machine learning team responsible for building a model that predicts the likelihood of registered users to wager on a given event based on several features of sports events offered in the app.
You and your team have selected the Linear Learner algorithm and have trained your model.
You now wish to find the best set of hyperparameters for your model.
You have chosen to use SageMaker's automatic model tuning, and you have set your objective to validation:precision in your hyperparameter tuning job. How do you pass your tuning job settings into your hyperparameter tuning job? (Select THREE)
Click on the arrows to vote for the correct answer
A. B. C. D. E. F.Answers: B, C, E.
Option A is incorrect.
The correct name of the value you use to pass your JSON object is HyperParameterTuningJobConfig, and the name of the job is CreateHyperParameterTuningJob.
Option B is correct.
To specify the hyperparameter settings for your hyperparameter tuning job, you pass a JSON object as the HyperParameterTuningJobConfig parameter to the job named CreateHyperParameterTuningJob.
Option C is correct.You specify the ranges of the hyperparameters you want to tune in the ParameterRanges section of the HyperParameterTuningJobConfig.
Option D is incorrect.
You specify the ranges of the hyperparameters you want to tune in the ParameterRanges section of the HyperParameterTuningJobConfig, not the limits of the hyperparameters.
Option E is correct.
In the HyperParameterTuningJobObjective section of the HyperParameterTuningJobConfig, you set MetricName to the objective metric for the hyperparameter tuning job.
Option F is incorrect.
There is no MaxSequentialTrainingJobs parameter in the ResourceLimits section of the HyperParameterTuningJobConfig.
Reference:
Please see the Amazon SageMaker developer guide titled Automatic Model Tuning, and the Amazon SageMaker developer guide titled Configure and Launch a Hyperparameter Tuning Job.
To pass tuning job settings into a hyperparameter tuning job in Amazon SageMaker, you need to define a JSON object and pass it as the value of the HyperParameterTuningJobConfig to the CreateHyperParameterTuningJob API. The JSON object should specify the ranges of the hyperparameters you want to tune, the objective metric for the hyperparameter tuning job, and any resource limits or other settings you want to apply.
The following are the steps to configure and initiate hyperparameter tuning in Amazon SageMaker:
Select the algorithm to use for the model training. In this case, the Linear Learner algorithm was selected.
Define the hyperparameters that you want to tune. For example, in this case, you could select the learning rate, the regularization rate, and the number of hidden layers.
Define the ranges for each hyperparameter. For example, you might choose to tune the learning rate between 0.01 and 0.1, the regularization rate between 0.001 and 0.01, and the number of hidden layers between 1 and 5.
Specify the objective metric for the hyperparameter tuning job. In this case, the objective is validation:precision, meaning the goal is to optimize the precision of the model on the validation set.
Define any resource limits or other settings you want to apply. For example, you might specify the maximum number of training jobs to run in parallel or the maximum number of hours to run the tuning job.
Once you have defined the JSON object with the above information, you can pass it as the value of the HyperParameterTuningJobConfig parameter to the CreateHyperParameterTuningJob API. Amazon SageMaker will then initiate the hyperparameter tuning job, creating and evaluating multiple models with different combinations of hyperparameters until the best set of hyperparameters is identified based on the objective metric you defined.
In summary, to pass tuning job settings into a hyperparameter tuning job in Amazon SageMaker, you need to define a JSON object that specifies the ranges of the hyperparameters you want to tune, the objective metric for the tuning job, and any resource limits or other settings you want to apply. You then pass this JSON object as the value of the HyperParameterTuningJobConfig parameter to the CreateHyperParameterTuningJob API.