(self, model, cost_model=None, **kwargs)
Updates each acquisition_functions function object if the models
        have changed

        Parameters
        ----------
        model: Model object
            The model of the objective function, it has to be an instance of
            GaussianProcessMCMC.
        cost_model: Model object
            If the acquisition_functions function also takes the cost into account, we
            have to specify here the model for the cost function. cost_model
            has to be an instance of GaussianProcessMCMC.
Updates each acquisition_functions function object if the models
        have changed
Updates each acquisition_functions function object if the models have changed
def update(self, model, cost_model=None, **kwargs):
        """
        Updates each acquisition_functions function object if the models
        have changed

        Parameters
        ----------
        model: Model object
            The model of the objective function, it has to be an instance of
            GaussianProcessMCMC.
        cost_model: Model object
            If the acquisition_functions function also takes the cost into account, we
            have to specify here the model for the cost function. cost_model
            has to be an instance of GaussianProcessMCMC.
        """
        if len(self.estimators) == 0:
            for i in range(len(self.model.models)):
                # Copy the acquisition_functions function for this model
                estimator = deepcopy(self.acquisition_func)
                if len(self.model.models) == 0:
                    estimator.model = None
                else:
                    estimator.model = self.model.models[i]

                if self.cost_model is not None:
                    if len(self.cost_model.models) == 0:
                        estimator.model = None
                    else:
                        estimator.model = self.cost_model.models[i]
                self.estimators.append(estimator)

        self.model = model
        if cost_model is not None:
            self.cost_model = cost_model
        for i in range(len(self.model.models)):

            if cost_model is not None:
                self.estimators[i].update(self.model.models[i],
                                          self.cost_model.models[i],
                                          **kwargs)
            else:
                self.estimators[i].update(self.model.models[i], **kwargs)
def update ( self , model , cost_model = None , * * kwargs ) : if len ( self . estimators ) == 0 : for i in range ( len ( self . model . models ) ) : # Copy the acquisition_functions function for this model estimator = deepcopy ( self . acquisition_func ) if len ( self . model . models ) == 0 : estimator . model = None else : estimator . model = self . model . models [ i ] if self . cost_model is not None : if len ( self . cost_model . models ) == 0 : estimator . model = None else : estimator . model = self . cost_model . models [ i ] self . estimators . append ( estimator ) self . model = model if cost_model is not None : self . cost_model = cost_model for i in range ( len ( self . model . models ) ) : if cost_model is not None : self . estimators [ i ] . update ( self . model . models [ i ] , self . cost_model . models [ i ] , * * kwargs ) else : self . estimators [ i ] . update ( self . model . models [ i ] , * * kwargs )