code: def EI_empirical(samples, thresh):
      """Expected Improvement over threshold from samples
  
      (See example usage in EI_gaussian_empirical)
      """
      improvement = np.maximum(samples - thresh, 0)
      return improvement.mean()
  
file_path: auptimizer/src/aup/Proposer/hyperopt/criteria.py
imports: from __future__ import division
  from past.utils import old_div
  import numpy
  import scipy.stats
label_desc: Use image node_id 1 for calling a global function with example usage: EI_empirical(samples, thresh) and returns: improvement