#NEWLINE# def predict( self , x ) : #NEWLINE# #INDENT# '\n        Calculates a predicted value of the response based on the current\n        response surface model for the supplied list of inputs.\n\n        Args\n        ----\n        x : array-like\n            Point at which the surrogate is evaluated.\n        ' #NEWLINE# super ( ResponseSurface , self ) . predict ( x ) #NEWLINE# n = x . size #NEWLINE# X = zeros ( ( ( ( self . n + 1 ) * ( self . n + 2 ) ) // 2 ) ) #NEWLINE# X [ 0 ] = 1.0 #NEWLINE# X [ 1 : ( n + 1 ) ] = x #NEWLINE# X_offset = X [ ( n + 1 ) : ] #NEWLINE# for i in range ( n ) : #NEWLINE# #INDENT# X_offset [ : ( n - i ) ] = ( x [ i ] * x [ i : ] ) #NEWLINE# X_offset = X_offset [ ( n - i ) : ] #NEWLINE# #UNINDENT# return X . dot ( self . betas )