Skip to content
Hao Wang edited this page Sep 27, 2020 · 7 revisions

Welcome to the Bayesian-Optimization wiki!

Creating the Search Space

from bayes_optim import BO, ContinuousSpace

n = 2
# Continuous variables can be specified as follows:
# for n real-valued variable in [-5, 5]^n
# for n variables, the naming scheme is continuous0, continuous1
C = ContinuousSpace([-5, 5], var_name='continuous') * n
print(C.var_names)

# Equivalently, you can also use
# C = ContinuousSpace([[-5, 5]]] * n) 

# The general usage is:
# ContinuousSpace([[lb_1, ub_1], [lb_2, ub_2], ..., [lb_n, ub_n]]) 

Clone this wiki locally