exam questions

Exam DP-100 All Questions

View all questions & answers for the DP-100 exam

Exam DP-100 topic 3 question 32 discussion

Actual exam question from Microsoft's DP-100
Question #: 32
Topic #: 3
[All DP-100 Questions]

HOTSPOT -
You are using the Azure Machine Learning Service to automate hyperparameter exploration of your neural network classification model.
You must define the hyperparameter space to automatically tune hyperparameters using random sampling according to following requirements:
✑ The learning rate must be selected from a normal distribution with a mean value of 10 and a standard deviation of 3.
✑ Batch size must be 16, 32 and 64.
✑ Keep probability must be a value selected from a uniform distribution between the range of 0.05 and 0.1.
You need to use the param_sampling method of the Python API for the Azure Machine Learning Service.
How should you complete the code segment? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: normal(10,3)
Box 2: choice(16, 32, 64)
Box 3: uniform(0.05, 0.1)
In random sampling, hyperparameter values are randomly selected from the defined search space. Random sampling allows the search space to include both discrete and continuous hyperparameters.
Example:
from azureml.train.hyperdrive import RandomParameterSampling
param_sampling = RandomParameterSampling( {
"learning_rate": normal(10, 3),
"keep_probability": uniform(0.05, 0.1),
"batch_size": choice(16, 32, 64)
}
Reference:
https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-tune-hyperparameters

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Andrexx
Highly Voted 4 years ago
Agree with the answer
upvoted 14 times
...
ahson0124
Highly Voted 1 year, 9 months ago
In exam on 2023-02-15
upvoted 6 times
...
umair_hanu
Most Recent 1 year, 5 months ago
correct
upvoted 1 times
...
Arend78
1 year, 12 months ago
I think the correct syntax for choice is Choice(values=[16, 32, 64, 128]) Just mentioning this in case it will become question on the exam ;) https://learn.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters
upvoted 4 times
og44
8 months, 4 weeks ago
Also the requirement "Batch size must be 16, 32 and 64." is mal-formed. This implies all the the same time. However, it is one of them. as indicated in the documentation. Besides, I guess random.choice[ 16, 32,64] would return one of the options. https://learn.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters?view=azureml-api-2
upvoted 1 times
...
...
nato16
4 years, 2 months ago
How can the learning rate have a value of mean, just curious, usually it less then 1.
upvoted 2 times
lollo1234
4 years, 2 months ago
it can just be an arbitrary scalar value to weight new observations of gradients
upvoted 4 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...