def predict(self, x):

        super(KrigingSurrogate, self).predict(x)

        X, Y = self.X, self.Y
        thetas = power(10., self.thetas)
        r = exp(-thetas.dot(square((x - X).T)))

        if self.R_fact is not None:
            # Cholesky Decomposition
            sol = cho_solve(self.R_fact, r).T
        else:
            # Linear Least Squares
            sol = lstsq(self.R, r)[0].T

        f = self.mu + dot(r, self.R_solve_ymu)
        term1 = dot(r, sol)

        # Note: sum(sol) should be 1, since Kriging is an unbiased
        # estimator. This measures the effect of numerical instabilities.
        bias = (1.0 - sum(sol)) ** 2. / sum(self.R_solve_one)

        mse = self.sig2 * (1.0 - term1 + bias)
        rmse = sqrt(abs(mse))

        return f, rmse
Calculates a predicted value of the response based on the current
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/surrogate_models/kriging.py/KrigingSurrogate.predict