"type": "float",
            "bound": [0.7, 1],
            "default": 1,
            "q": 0.1
        },
        "colsample_bytree": {
            "type": "float",
            "bound": [0.7, 1],
            "default": 1,
            "q": 0.1
        },
    },
    # "num_objs": 1,
    # "num_constraints": 0,
    # "advisor_type": "default",
    "max_runs": 100,
    # "surrogate_type": "prf",
    "time_limit_per_trial": 180,
    # "logging_dir": "logs",
    "task_id": "so_hpo"
}

bo = create_smbo(objective_function, **config_dict)
history = bo.run()

print(history)
history.plot_convergence()
plt.show()

# history.visualize_jupyter()
Пример #2
0
def main():
    bo = create_smbo(branin, **config_dict)
Пример #3
0
config_dict = {
    "optimizer": "SMBO",
    "parameters": {
        "x1": {
            "type": "float",
            "bound": [-5, 10],
            "default": 0
        },
        "x2": {
            "type": "float",
            "bound": [0, 15]
        },
    },
    "advisor_type": 'default',
    "max_runs": 50,
    "surrogate_type": 'gp',
    "time_limit_per_trial": 5,
    "logging_dir": 'logs',
    "task_id": 'hp1'
}

bo = create_smbo(branin, **config_dict)
history = bo.run()
inc_value = bo.get_incumbent()
print('BO', '=' * 30)
print(inc_value)

print(history)
history.plot_convergence(true_minimum=0.397887)
plt.show()