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
Name | Description |
---|---|
parameter_space
Required
|
A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. |
properties
|
A dictionary with additional properties for the algorithm. Default value: None
|
parameter_space
Required
|
A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. |
properties
Required
|
A dictionary with additional properties for the algorithm. |
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'