def train(self, X, Y):

        #TODO: Check if one training point will work... if not raise error
        """self.X = []
        self.Y = []
        for ins,out in zip(X,Y):
            if ins not in self.X:
                self.X.append(ins)
                self.Y.append(out)
            else: "duplicate training point" """

        self.X = X
        self.Y = Y
        self.m = len(X[0])
        self.n = len(X)

        thetas = zeros(self.m)
        #print "initial guess", thetas

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

        #if self.thetas == None:
        #self.thetas = fmin(_calcll, thetas, disp=False, ftol=0.0001)
        def lowerBound(log10t):
            return log10t - log10(self.thetas)

        def upperBound(log10t):
            return log10(self.thetas) - log10t

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

        self.thetas = minimize(_calcll, thetas, method='COBYLA', constraints=cons, tol=1e-8).x
        #print self.thetas
        self._calculate_log_likelihood()
Train the surrogate model with the given set of inputs and outputs.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/surrogatemodels/kriging_surrogate.py/KrigingSurrogate.train