hyperoptax.spaces#
Classes
|
Uniform continuous space over |
|
Log-uniform continuous space over |
- class hyperoptax.spaces.Space[source]#
Abstract base class for hyperparameter search spaces.
- __init__()#
- Return type:
None
- class hyperoptax.spaces.LinearSpace(lower_bound, upper_bound)[source]#
Uniform continuous space over
[lower_bound, upper_bound].
- class hyperoptax.spaces.DiscreteSpace(values)[source]#
Discrete space over a fixed set of values.
Samples uniformly from
values.transformsnaps any continuous value to the nearest element, which is useful when discrete candidates are generated via continuous optimization (e.g. inBayesianSearch).- Parameters:
values (tuple)
- class hyperoptax.spaces.LogSpace(lower_bound, upper_bound, base=10)[source]#
Log-uniform continuous space over
[lower_bound, upper_bound].Samples uniformly in log space so that each order of magnitude receives equal probability mass. Useful for learning rates and other scale parameters that span several orders of magnitude.
- class hyperoptax.spaces.QLinearSpace(lower_bound, upper_bound, datatype=<class 'jax.numpy.int32'>)[source]#
Quantized (integer) variant of
LinearSpace.Samples uniformly from
[lower_bound, upper_bound]and rounds to the nearest integer. Use this for discrete integer hyperparameters with a uniform prior (e.g. number of layers, batch size).
- class hyperoptax.spaces.QLogSpace(lower_bound, upper_bound, base=10, datatype=<class 'jax.numpy.int32'>)[source]#
Quantized (integer) variant of
LogSpace.Samples in log space and rounds to the nearest integer. Use this for integer hyperparameters whose scale spans orders of magnitude (e.g. number of hidden units, number of warmup steps).