#NEWLINE# def predictCostAndUncer( self , params ) : #NEWLINE# #INDENT# costNUnc = nm . array ( [ gp . predict ( params . reshape ( 1 , self . numParams ) , eval_MSE = True ) for gp in self . gaussProcessParticles ] ) #NEWLINE# costs = costNUnc [ : , 0 , 0 ] #NEWLINE# MSEs = costNUnc [ : , 1 , 0 ] #NEWLINE# predCost = float ( nm . average ( costs , weights = self . normWeights ) ) #NEWLINE# predUnc = float ( nm . sqrt ( ( nm . average ( ( predCost + ( costs ** 2 ) ) , weights = self . normWeights ) - ( predCost ** 2 ) ) ) ) #NEWLINE# return ( predCost , predUnc )