def train(self,X,Y): 
        
        X = matrix(X)
        Y = matrix(Y).T
        
        self.m = X.shape[0]
        self.n = X.shape[1]
        
        # Modify X to include constant, squared terms and cross terms
        X = concatenate((matrix(ones((self.m,1))),X),1) 
        for i in range(1,self.n+1):
            X = concatenate((X,power(X[:,i],2)),1)
        for i in range(1,self.n):
            for j in range(i+1,self.n+1):
                X = concatenate((X,multiply(X[:,i],X[:,j])),1)
        
        # Determine response surface equation coefficients (betas) using least squares
        self.betas, rs, r, s = linalg.lstsq(X,Y)
Calculate response surface equation coefficients using least squares regression.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/surrogatemodels/response_surface.py/ResponseSurface.train