Skip to content

Input Parameter Types

arturluis edited this page Jun 26, 2020 · 10 revisions

HyperMapper supports four different parameter types in its search space: Real, Integer, Ordinal, and Categorical. Each of these parameters is defined in the json scenario file by a unique label, the parameter type, and the possible values for the parameter:

"input_parameters" : {
    "label1": {
        "parameter_type" : type1,
        "values" : values1
    },
    "label2": {
        "parameter_type" : type2,
        "values" : values2
    }
}

Note that the parameters can be of different types and must have unique labels. An explanation and examples on how to define each parameter type are presented below. Optionally, users can also define priors for each parameter informing where in the input space they expect to find "good" function values.

Real Parameters

A real parameter is a continuous numerical parameter that can assume any value real value within a interval. The values field for this parameter must be an array containing the lower and upper limits of the parameter's interval:

"input_parameters" : {
    "x1": {
        "parameter_type" : "real",
        "values" : [-5, 10]
    }
}

See the quick-start guide for a complete optimization example using real input parameters.

Integer Parameters

An integer parameter is a discrete numerical parameter that can assume any integer value within a specified interval. Like real parameters, the values field for this parameter must be an array containing the lower and upper limits of the parameter's interval:

"input_parameters" : {
    "x3": {
        "parameter_type" : "integer",
        "values" : [-5, 10]
    }
}

See the Branin4 example for a complete optimization example using integer input parameters.

Ordinal Parameters

An ordinal parameter is a discrete numerical parameter that can assume any value within an array of ordered possible values. It is important to note that the ordinal parameter assumes an order between consecutive values, i.e., a value is always smaller than its successor. The values field for this parameter must be an array containing the possible values for the parameter. The array of possible values can contain any numerical value, but the values within the array must be ordered:

"input_parameters" : {
    "x1": {
        "parameter_type" : "ordinal",
        "values" : [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]
    },
}

See the CurrinExp example for a complete optimization example using ordinal input parameters.

Categorical Parameters

A categorical parameter is a discrete parameter that can assume any value within an array of possible values. Unlike ordinal parameters, the values do not need to be numeric (e.g. can be string or boolean) and there is no order between the possible parameter values. The values field for this parameter must be an array containing the possible values for the parameter:

"input_parameters" : {
    "x256": {
      "parameter_type" : "categorical",
      "values" : ["false", "true"],
    }
}

Note that the values in the array of possible values must be strings, numerical values must be written as strings in this parameter (e.g. "0" instead of 0). See the Spatial Use Case for a complete optimization example using categorical input parameters.

Clone this wiki locally