Exemplo n.º 1
0
    def type2(era1, era2):
        # a12 returns times that lst1 is greater than lst2
        # total = 0
        # n = 0
        # for obj_scores1, obj_scores2 in zip(era1, era2):
        #     # If this is 1, that means era1 is greater more often
        #     # If minimizing, this means era1 is worse
        #     total += a12(obj_scores1, obj_scores2)
        #     n += 1
        # return (total / n >= 0.5)

        # Currently returns true if even one of the objectives have improved
        # print "here:" + str(len(era2))
        # print "*****#############*************"
        for index, objective in enumerate(era2):
            # print "comparing:\n" + str(era1[index])
            # print "and\n"
            # print str(objective)
            # print "******"
            a12_score = a12(era1[index], objective)
            # print "######"
            # print a12_score
            # print "######"
            if (a12_score >= 0.56):
                # print "######"
                # print objective
                # print era1[index]
                # print a12_score
                # print "######"
                return True
        # print "######"
        # print a12_score
        # print "######"
        return False
Exemplo n.º 2
0
 def type2(era1, era2):
     # a12 returns times that lst1 is greater than lst2
     total = 0
     n = 0
     for obj_scores1, obj_scores2 in zip(era1, era2):
         # If this is 1, that means new one is worse
         total += a12(obj_scores1, obj_scores2)
         n += 1
     return (total / n >= 0.5)
Exemplo n.º 3
0
 def type2(era1, era2):
     # a12 returns times that lst1 is greater than lst2
     total = 0
     n = 0
     for obj_scores1, obj_scores2 in zip(era1, era2):
         # If this is 1, that means era1 is greater more often
         # If minimizing, this means era1 is worse
         total += a12(obj_scores1, obj_scores2)
         n += 1
     return (total / n >= 0.5)
Exemplo n.º 4
0
 def type2(era1, era2):
     # a12 returns times that lst1 is greater than lst2
     total = 0
     n = 0
     for obj_scores1, obj_scores2 in zip(era1, era2):
         # If this is 1, that means era1 is greater more often
         # If minimizing, this means era1 is worse
         total += a12(obj_scores1, obj_scores2)
         n += 1
     return (total / n >= 0.5)