def EI_gaussian(mean, var, thresh):
 sigma = np.sqrt(var)
 score = old_div((mean - thresh), sigma)
 n = scipy.stats.norm
 return (sigma * ((score * n.cdf(score)) + n.pdf(score)))

def EI_gaussian ( mean , var , thresh ) : sigma = np . sqrt ( var ) score = old_div ( ( mean - thresh ) , sigma ) n = scipy . stats . norm return ( sigma * ( ( score * n . cdf ( score ) ) + n . pdf ( score ) ) )
expected improvement of gaussian over threshold .