Documentation

Welcome to the developer documentation for SigOpt. If you have a question you can’t answer, feel free to contact us!
Welcome to the new SigOpt docs! If you're looking for the classic SigOpt documentation then you can find that here. Otherwise, happy optimizing!

Define and Set Up Parameter Space

You can define the hyperparameter space for any SigOpt Experiment using four types of parameters: double, integers, categorical and grid value parameters. You're able to use up to 100 different hyperparameters to define the hyperparameter space.

Each of the hyperparameters are defined as its own object and the entire hyperparameter space is defined in the experiment create call as a list of objects.

If you have a prior probability for any of the hyperparameters, it is possible to give this information to the SigOpt Optimizer as part of the SigOpt Experiment create call.

Continuous Parameters

A continuous parameter also referred to as double can take on any value between the minimum and maximum values specified by the bounds.

dict(
  name="parameter",
  bounds=dict(
    min=0,
    max=1
  ),
  type="double"
)

Log Transformation of Continuous Parameter

It is also possible to have the optimizer search any continuous parameter in a log-space by invoking log-transformation as part of the experiment create call.

dict(
  name="log_parameter",
  bounds=dict(
    min=0.001,
    max=1
  ),
  transformation="log",
  type="double"
)

Integer Parameters

An Integer parameter is similar to a double parameter, but it can only take on integer values in-between the bounds.

dict(
  name="parameter",
  bounds=dict(
    min=0,
    max=10
  ),
  type="int"
)

Categorical Parameters

A categorical parameter is defined as any parameter with a non-ordinal relation, meaning that the user has to define a finite set of values which the parameter can take.

dict(
  name="parameter",
  categorical_values=[
    "val_a",
    "val_b",
    "val_c"
  ],
  type="categorical"
)

Limitations: A SigOpt Experiment can only have a total of 10 categorical values across all categorical parameters.

Grid Values

Grid values are any continuous and integer parameter being discretized into a set of values.

You are free to define any set of values and it is not necessary for these values to be evenly spaced out.

dict(
  name="parameter",
  type="double",
  grid=[
    0.00001,
    0.001,
    0.33,
    0.999
  ]
)

dict(
  name="parameter",
  type="int",
  grid=[
    3,
    4,
    7,
    10
  ]
)

Note: specifying the grid values is not the same as conducting grid search. Unlike grid search, every grid value is not guaranteed to appear in the suggestions generated by SigOpt. In other words, instead of exhaustively searching through all possible grid values, SigOpt intelligently suggests the most promising grid value. This is especially efficient when the user defines a grid on many Parameters.

Log Transformation of Grid Values

It is possible to log-transform continuous Grid Values.

dict(
  name="parameter",
  type="double",
  grid=[
    0.00001,
    0.001,
    0.33,
    0.999
  ],
  transformation="log"
)

Define Prior Distributions

When defining a continuous hyperparameter it is possible to seed this parameter using a prior probability. The parameter is seeded during the SigOpt Experiment create call using either a normal- or beta-distribution. For more information on how to define these distributions visit the following documentation.

dict(
  name="name",
  bounds=dict(
    min=0,
    max=1
  ),
  prior=dict(
    name="beta",
    shape_a=2,
    shape_b=4.5
  ),
  type="double"
)

dict(
  name="name",
  bounds=dict(
    min=0,
    max=1
  ),
  prior=dict(
    name="normal",
    mean=0.6,
    scale=0.15
  ),
  type="double"
)

Define Conditional Parameters

Conditional parameters allow you to define dependencies between parameters. When a dependency is satisfied, SigOpt will recognize this and provide parameter assignments for dependent parameters. Here's how to define conditional parameters in your Experiment:

dict(
  conditionals=[
    dict(
      name="num_conv_layers",
      values=[
        "1",
        "2",
        "3"
      ]
    )
  ],
  parameters=[
    dict(
      name="layer_2_num_filters",
      conditions=dict(
        num_hidden_layers=[
          "2",
          "3"
        ]
      ),
      type="int",
      bounds=dict(
        min=100,
        max=300
      )
    )
  ]
)

In the above example, SigOpt will provide parameter assignments for layer_2_num_filters when num_conv_layers == 2 or num_conv_layers == 3.