GridParameterSampling Class
Defines grid sampling over a hyperparameter search space.
Initialize GridParameterSampling.
- Inheritance
-
azureml.train.hyperdrive.sampling.HyperParameterSamplingGridParameterSampling
Constructor
GridParameterSampling(parameter_space, properties=None)
Parameters
- parameter_space
- dict
A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. Only choice is supported for GridParameter sampling.
- parameter_space
- dict
A dictionary containing each parameter and its distribution.
The dictionary key is the name of the parameter. Only
choice
is supported for GridParameter sampling.
- properties
Remarks
In this sampling algorithm, parameter values are chosen from discrete values. You can use the choice function to generate discrete values. For example:
{
"lr": choice(1, 2, 3),
"batch": choice(8, 9)
}
This will define a search space with two parameters, lr
and batch
.
lr
can have one of the values [1, 2, 3], and batch
a value one of the values [8, 9].
You can also create discrete hyperparameters using a distribution. For more information, see the tutorial Tune hyperparameters for your model.
Attributes
SAMPLING_NAME
SAMPLING_NAME = 'GRID'
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for