diff options
Diffstat (limited to 'gi')
-rw-r--r-- | gi/evaluation/confusion_matrix.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gi/evaluation/confusion_matrix.py b/gi/evaluation/confusion_matrix.py index 55cad256..2dd7aa47 100644 --- a/gi/evaluation/confusion_matrix.py +++ b/gi/evaluation/confusion_matrix.py @@ -92,7 +92,9 @@ if output_fname: # re-sort preds to get a better diagonal ptags=[] - if False: + if True: + ptags = map(lambda (p,c): p, preds) + else: remaining = set(predict_frequencies.keys()) for y, (gtag, gcount) in enumerate(gtags): best = (None, 0) @@ -103,6 +105,9 @@ if output_fname: ptags.append(ptag) remaining.remove(ptag) if not remaining: break + + print 'Predicted tag ordering:', ' '.join(ptags) + print 'Gold tag ordering:', ' '.join(map(lambda (t,c): t, gtags)) draw = ImageDraw.Draw(image) for x, ptag in enumerate(ptags): |