RandomParameterSampling Class
Defines random sampling over a hyperparameter search space.
Initialize RandomParameterSampling.
- Inheritance
-
azureml.train.hyperdrive.sampling.HyperParameterSamplingRandomParameterSampling
Constructor
RandomParameterSampling(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.
- parameter_space
- dict
A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter.
Remarks
In this sampling algorithm, parameter values are chosen from a set of discrete values or a distribution over a continuous range. Examples of functions you can use include: choice, uniform, loguniform, normal, and lognormal. For example,
{
"init_lr": uniform(0.0005, 0.005),
"hidden_size": choice(0, 100, 120, 140, 180)
}
This will define a search space with two parameters, init_lr
and hidden_size
.
The init_lr
can have a uniform distribution with 0.0005 as a minimum value and 0.005 as a maximum value,
and the hidden_size
will be a choice of [80, 100, 120, 140, 180].
For more information about using RandomParameter sampling, see the tutorial Tune hyperparameters for your model.
Attributes
SAMPLING_NAME
SAMPLING_NAME = 'RANDOM'
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