
Answer-first summary for fast verification
Answer: Choice
The question specifically asks for a class to define discrete hyperparameters as a list of predetermined, comma-separated integer values. According to the Azure Machine Learning documentation and the community discussion with high upvotes (5 and 4 upvotes), the Choice class from azure.ai.ml.sweep is designed for discrete hyperparameters and supports specifying a list of predetermined values, including integers. The community consensus strongly favors Choice (86% of answers), with detailed reasoning citing Microsoft documentation that confirms Choice can handle discrete values like comma-separated integers. Randint (option B) is incorrect because it generates random integers within a range rather than a predetermined list, and Uniform (C) and Normal (D) are for continuous distributions, not discrete lists.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You create an Azure Machine Learning workspace and need to use the Azure Machine Learning Python SDK v2 to define a search space for discrete hyperparameters. The hyperparameters must be defined as a list of predetermined, comma-separated integer values.
Which class from the azure.ai.ml.sweep package should you import to create this list of values?
A
Choice
B
Randint
C
Uniform
D
Normal
No comments yet.