Esempio n. 1
0
    def _getRun(self, functionName, resultName, rank=0.0):
        results = self.getFunctionResults(functionName, [resultName])
        runs = []

        pareto = self.getFunctionPareto(functionName)
        metrics = Metrics(pareto, [results[0][1]])
        for run in xrange(len(results[0][1])):
            metrics.setSolutionsToCompare(0, run, None, None)
            value = metrics.deltaP()
            runs.append([value, run])
        runs.sort(key = lambda x : x[0])
        idx = max(0, int(round(len(runs) * rank)) - 1)
        return runs[idx][1]