(self, objective_func, lower, upper,
                 acquisition_func, model, maximize_func,
                 initial_design=init_random_uniform,
                 initial_points=3,
                 output_path=None,
                 train_interval=1,
                 n_restarts=1,
                 rng=None)
Implementation of the standard Bayesian optimization loop that uses
        an acquisition function and a model to optimize a given objective_func.
        This module keeps track of additional information such as runtime,
        optimization overhead, evaluated points and saves the output
        in a json file.

        Parameters
        ----------
        acquisition_func: BaseAcquisitionFunctionObject
            The acquisition function which will be maximized.
        model: ModelObject
            Model (i.e. GaussianProcess, RandomForest) that models our current
            believe of the objective function.
        objective_func:
            Function handle for the objective function
        output_path: string
            Specifies the path where the intermediate output after each iteration will be saved.
            If None no output will be saved to disk.
        initial_design: function
            Function that returns some points which will be evaluated before
            the Bayesian optimization loop is started. This allows to
            initialize the model.
        initial_points: int
            Defines the number of initial points that are evaluated before the
            actual Bayesian optimization.
        train_interval: int
            Specifies after how many iterations the model is retrained.
        n_restarts: int
            How often the incumbent estimation is repeated.
        rng: np.random.RandomState
            Random number generator
Implementation of the standard Bayesian optimization loop that uses
        an acquisition function and a model to optimize a given objective_func.
        This module keeps track of additional information such as runtime,
        optimization overhead, evaluated points and saves the output
        in a json file.
Implementation of the standard Bayesian optimization loop that uses an acquisition function and a model to optimize a given objective_func . This module keeps track of additional information such as runtime optimization overhead evaluated points and saves the output in a json file .
def __init__(self, objective_func, lower, upper,
                 acquisition_func, model, maximize_func,
                 initial_design=init_random_uniform,
                 initial_points=3,
                 output_path=None,
                 train_interval=1,
                 n_restarts=1,
                 rng=None):
        """
        Implementation of the standard Bayesian optimization loop that uses
        an acquisition function and a model to optimize a given objective_func.
        This module keeps track of additional information such as runtime,
        optimization overhead, evaluated points and saves the output
        in a json file.

        Parameters
        ----------
        acquisition_func: BaseAcquisitionFunctionObject
            The acquisition function which will be maximized.
        model: ModelObject
            Model (i.e. GaussianProcess, RandomForest) that models our current
            believe of the objective function.
        objective_func:
            Function handle for the objective function
        output_path: string
            Specifies the path where the intermediate output after each iteration will be saved.
            If None no output will be saved to disk.
        initial_design: function
            Function that returns some points which will be evaluated before
            the Bayesian optimization loop is started. This allows to
            initialize the model.
        initial_points: int
            Defines the number of initial points that are evaluated before the
            actual Bayesian optimization.
        train_interval: int
            Specifies after how many iterations the model is retrained.
        n_restarts: int
            How often the incumbent estimation is repeated.
        rng: np.random.RandomState
            Random number generator
        """

        if rng is None:
            self.rng = np.random.RandomState(np.random.randint(100000))
        else:
            self.rng = rng

        self.model = model
        self.acquisition_func = acquisition_func
        self.maximize_func = maximize_func
        self.start_time = time.time()
        self.initial_design = initial_design
        self.objective_func = objective_func
        self.X = None
        self.y = None
        self.time_func_evals = []
        self.time_overhead = []
        self.train_interval = train_interval
        self.lower = lower
        self.upper = upper
        self.output_path = output_path
        self.time_start = None

        self.incumbents = []
        self.incumbents_values = []
        self.n_restarts = n_restarts
        self.init_points = initial_points
        self.runtime = []
def __init__ ( self , objective_func , lower , upper , acquisition_func , model , maximize_func , initial_design = init_random_uniform , initial_points = 3 , output_path = None , train_interval = 1 , n_restarts = 1 , rng = None ) : if rng is None : self . rng = np . random . RandomState ( np . random . randint ( 100000 ) ) else : self . rng = rng self . model = model self . acquisition_func = acquisition_func self . maximize_func = maximize_func self . start_time = time . time ( ) self . initial_design = initial_design self . objective_func = objective_func self . X = None self . y = None self . time_func_evals = [ ] self . time_overhead = [ ] self . train_interval = train_interval self . lower = lower self . upper = upper self . output_path = output_path self . time_start = None self . incumbents = [ ] self . incumbents_values = [ ] self . n_restarts = n_restarts self . init_points = initial_points self . runtime = [ ]