Hyperparameter Search: Grid¶
The grid search method generates trials on a “grid” of hyperparameter configurations and trains
each trial for the number of training units specified by max_length. The user specifies a set of
values for each hyperparameter via the hyperparameters field in the experiment
configuration. The “grid” of hyperparameter
configurations is generated by taking the product of these sets. For example, if the set of
values for three separate hyperparameters aparam, bparam, and cparam are specified as
{0, 1, 2}, {10, 20}, and {"c"} respectively, then the grid of tuples (aparam, bparam,
cparam) generated is:
(0, 10, "c")
(0, 20, "c")
(1, 10, "c")
(1, 20, "c")
(2, 10, "c")
(2, 20, "c")
The way the set of hyperparameter values is specified depends on the type of hyperparameter:
const: The set of values contains just the single value. For example,cparamabove could be specified as aconsthyperparameter withval: c.categorical: The set of values is exactly the set of categorical values. For example,bparamabove could be specified as acategoricalhyperparameter withvals: [10, 20].int: The set ofcountvalues is taken evenly from the range[minval, maxval], inclusive of endpoints. Ifcountis larger than the number of integer values in the range, that is interpreted as the entire range of integers in[minval, maxval]. For example,aparamabove could be specified as aninthyperparameter withminval: 0,maxval: 2, andcount: 3orcount: 100.double: The set ofcountvalues is taken evenly from the range[minval, maxval], inclusive of endpoints. The set{0.1, 0.3, 0.5}could be specified as adoublehyperparameter withminval: 0.1,maxval: 0.5,count: 3.log: The set ofcountvalues is taken logarithmically evenly from the range[base^minval, base^maxval], inclusive of endpoints. For example, the set{0.00001, 0.0001, 0.001}could be specified as aloghyperparameter withbase: 10,minval: -5,maxval: -3, andcount: 3.
In the special case of count: 1 for int, double, or log, the midpoint (with rounding
for int and with base midpoint for log) is returned.