def technique_scores(self, directory, labels, ykey, xkey='#sec', factor=10.0):
    max_duration = None
    min_value = float('inf')
    for label in labels:
      try:
        dr = csv.DictReader(open(os.path.join(directory,label+"_percentiles.dat")), delimiter=' ', lineterminator='\n')
        lastrow = list(dr)[-1]
        max_duration = max(max_duration, float(lastrow[xkey]))
        min_value = min(min_value, float(lastrow[ykey]))
      except:
        log.exception("failed computing score")

    scores = list()

    for label in labels:
      try:
        dr = csv.DictReader(open(os.path.join(directory,label+"_percentiles.dat")), delimiter=' ', lineterminator='\n')
        score = 0.0
        lastsec = 0.0
        value = float('inf')
        for row in dr:
          duration = float(row[xkey]) - lastsec
          lastsec = float(row[xkey])
          value = float(row[ykey])
          score += duration * (value - min_value)
        score += (factor*max_duration - lastsec) * (value - min_value)
        scores.append((score, label))
      except:
        log.exception("failed computing score")

    return sorted(scores)
dataset/ETHPy150Open jansel/opentuner/opentuner/utils/stats.py/StatsMain.technique_scores/original