Designing and Implementing a Data Science Solution on Azure — Question 100
You create an Azure Machine learning workspace.
You must use the Azure Machine Learning Python SDK v2 to define the search space for discrete hyperparameters. The hyperparameters must consist of a list of predetermined, comma-separated integer values.
You need to import the class from the azure.ai.ml.sweep package used to create the list of values.
Which class should you import?
Answer options
- A. Choice
- B. Randint
- C. Uniform
- D. Normal
Correct answer: A
Explanation
The correct class to import is 'Choice', as it is specifically designed to handle discrete hyperparameters by allowing you to define a list of predetermined values. The other options, 'Randint', 'Uniform', and 'Normal', are used for continuous or random distributions and do not apply to the requirement for discrete values.