From 0fad267f4d1bcfc0f6d61ab15bc34d0b0bd493f8 Mon Sep 17 00:00:00 2001
From: Hsien-Chin Lin <linh@hhu.de>
Date: Tue, 6 Dec 2022 00:09:59 +0100
Subject: [PATCH] wip

---
 convlab/policy/emoTUS/evaluate.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/convlab/policy/emoTUS/evaluate.py b/convlab/policy/emoTUS/evaluate.py
index d67a1e1a..9b479ca2 100644
--- a/convlab/policy/emoTUS/evaluate.py
+++ b/convlab/policy/emoTUS/evaluate.py
@@ -232,6 +232,7 @@ class Evaluator:
 def emotion_score(golden_emotions, gen_emotions):
     labels = ["Neutral", "Disappointed", "Dissatisfied",
               "Apologetic", "Abusive", "Excited", "Satisfied"]
+    print(labels)
     macro_f1 = metrics.f1_score(golden_emotions, gen_emotions, average="macro")
     sep_f1 = metrics.f1_score(
         golden_emotions, gen_emotions, average=None, labels=labels)
@@ -240,7 +241,7 @@ def emotion_score(golden_emotions, gen_emotions):
         confusion_matrix=cm, display_labels=labels)
     disp.plot()
     plt.savefig("emotion.png")
-    r = {"macro_f1": macro_f1, "sep_f1": sep_f1, "cm": cm}
+    r = {"macro_f1": macro_f1, "sep_f1": list(sep_f1), "cm": list(cm)}
     print(r)
     return r
 
-- 
GitLab