def FormatStats(data, percentiles=None, indent=0):
  if len(data) == 0: return ''
  leader = ' ' * indent
  out_str = leader + 'mean=%.2f' % numpy.mean(data)
  out_str += '\n' + leader + 'median=%.2f' % numpy.median(data)
  out_str += '\n' + leader + 'stddev=%.2f' % numpy.std(data)
  if percentiles:
    out_str += '\n' + leader + '/'.join(map(str, percentiles))
    out_str += ' percentiles=%s' % numpy.percentile(data, percentiles)
  return out_str
Manually computes cosine scores for test set to create golden results
dataset/ETHPy150Open viewfinderco/viewfinder/backend/base/statistics.py/FormatStats--crossover with--dataset/ETHPy150Open taherh/pysimsearch/pysimsearch/test/sim_index_test.py/SimIndexTest.get_golden_hits_cos