Skip to content

Bounding the Multi‐objective Branin Function

Luigi Nardi edited this page Dec 20, 2019 · 1 revision

Important: this feature is still in development and might not work for some optimization problems.

HyperMapper will, by default, search along the entire Pareto front when optimizing multiple objectives. Instead, it is possible to tell HyperMapper to focus on a specific portion of the Pareto front. This is achieved by changing the weight sampling in the json file. We will show here how to do this with the multi‐objective Branin function.

The Objective Function

We wish to minimize the value of the Branin function and a fake energy estimation. Our objective function is defined as:

def branin_function_two_objectives(X):
    x1 = X['x1']
    x2 = X['x2']
    a = 1.0
    b = 5.1 / (4.0 * math.pi * math.pi)
    c = 5.0 / math.pi
    r = 6.0
    s = 10.0
    t = 1.0 / (8.0 * math.pi)

    y_value = a * (x2 - b * x1 * x1 + c * x1 - r) ** 2 + s * (1 - t) * math.cos(x1) + s
    y_energy = x1 + x2

    output = {}
    output["Value"] = y_value
    output["Energy"] = y_energy

    return output

The JSON Configuration File

The following is what needs to be specified as a json syntax:

{
    "application_name": "multiobjective_branin",
    "optimization_objectives": ["Value", "Energy"],
    "optimization_iterations": 50,
    "weight_sampling": "bounding_box",
    "bounding_box_limits": [0, 50, 0, 5],
    "input_parameters" : {
        "x1": {
            "parameter_type" : "real",
            "values" : [-5, 10],
            "parameter_default" : 0
        },
        "x2": {
            "parameter_type" : "real",
            "values" : [0, 15],
            "parameter_default" : 0
        }
    }
}

Notice that we have added two new fields:

"weight_sampling": "bounding_box",
"bounding_box_limits": [0, 50, 0, 5],

The "weight_sampling": "bounding_box" field tells HyperMapper that we want to search for Pareto optimal points inside a specific region of our search space. We refer to this region as a "bounding box". The limits of this bounding box are specified in the "bounding_box_limits" field. We specify a pair of limits for each objective. In this example, we have two objectives, so we specify 4 limits: (0, 50) for the first objective and (0, 5) for the second objective.

HyperMapper will try to focus on these regions of the Pareto front during optimization, however, it will not limit itself to this region. HyperMapper may sample points that are outside this region if the region does not contain Pareto points or if HyperMapper needs to explore the search space to improve its surrogate model.

More information on these fields can be found here.

Result

The figure below shows the result of our optimization. Note that the majority of points are inside or near the bounding box we specified.

Clone this wiki locally