def train(self, x, y):

        super(KrigingSurrogate, self).train(x, y)

        self.m = len(x[0])
        self.n = len(x)

        if self.n <= 1:
            raise ValueError(
                'KrigingSurrogate require at least 2 training points.'
            )

        self.X = x
        self.Y = y

        def _calcll(thetas):
            """ Callback function"""
            self.thetas = thetas
            self._calculate_log_likelihood()
            return -self.log_likelihood

        cons = []
        for i in range(self.m):
            cons.append({'type': 'ineq', 'fun': lambda logt: logt[i] - log10(1e-2)})  # min
            cons.append({'type': 'ineq', 'fun': lambda logt: log10(3) - logt[i]})     # max

        self.thetas = minimize(_calcll, zeros(self.m), method='COBYLA',
                               constraints=cons, tol=1e-8).x
        self._calculate_log_likelihood()
A groupchat message from the room's discussion history was received.
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/surrogate_models/kriging.py/KrigingSurrogate.train--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/muc.py/MUCClient.receivedHistory