示例#1
0
 def print_odds(self):
     """c
     """
     classes = self.classes
     most_confusing = self.most_confusing_evaluations
     for combo in most_confusing:
         print "##################################################"
         _, id1, id2 = combo
         class_1 = classes[str(id1)]
         class_2 = classes[str(id2)]
         print "%s and %s" %(class_1.alias, class_2.alias)
         twenty_odds, min_odd, max_odd = top_odds(class_1, class_2)
         print "Range: %.5f --> %.5f" %(min_odd, max_odd)
         print "--------------------------------------------------"
         for word in twenty_odds:
             word_odd = twenty_odds[word]
             msg = "\t%-15s%6.5f" %(word, word_odd)
             index = get_color_index(word_odd, min_odd, max_odd)
             index = max(index, 1)
             msg = color_text(msg, index, "black")
             print msg