shounakpaul95
commited on
Commit
•
4cef6e6
1
Parent(s):
83b0bb6
Update eval_utils.py
Browse files- eval_utils.py +5 -5
eval_utils.py
CHANGED
@@ -239,8 +239,8 @@ def evaluate_pcr(gold_data, pred_data):
|
|
239 |
print(f"Micro-F1@{k} on IL-PCR test set:", f1)
|
240 |
|
241 |
max_f1 = max(f1_scores)
|
242 |
-
index_max = f1_scores.index(max_f1) + 1
|
243 |
-
return {"muF1@K": f"{max_f1*100:.2f}
|
244 |
|
245 |
|
246 |
def evaluate_summ(gold_data, pred_data):
|
@@ -319,9 +319,9 @@ def create_output_json(evaluation_results):
|
|
319 |
"L-NER": {"strict mF1": evaluation_results["lner"]["strict mF1"]},
|
320 |
"RR": {"mF1": evaluation_results["rr"]["mF1"]},
|
321 |
"CJPE": {
|
322 |
-
"mF1": evaluation_results["cjpe"]["mF1"],
|
323 |
-
"ROUGE-L": evaluation_results["cjpe"]["ROUGE-L"],
|
324 |
-
"BLEU": evaluation_results["cjpe"]["BLEU"],
|
325 |
},
|
326 |
"BAIL": {"mF1": evaluation_results["bail"]["mF1"]},
|
327 |
"LSI": {"mF1": evaluation_results["lsi"]["mF1"]},
|
|
|
239 |
print(f"Micro-F1@{k} on IL-PCR test set:", f1)
|
240 |
|
241 |
max_f1 = max(f1_scores)
|
242 |
+
# index_max = f1_scores.index(max_f1) + 1
|
243 |
+
return {"muF1@K": f"{max_f1*100:.2f}"} #@{index_max}"}
|
244 |
|
245 |
|
246 |
def evaluate_summ(gold_data, pred_data):
|
|
|
319 |
"L-NER": {"strict mF1": evaluation_results["lner"]["strict mF1"]},
|
320 |
"RR": {"mF1": evaluation_results["rr"]["mF1"]},
|
321 |
"CJPE": {
|
322 |
+
"mF1": evaluation_results["cjpe-prediction"]["mF1"],
|
323 |
+
"ROUGE-L": evaluation_results["cjpe-explanation"]["ROUGE-L"],
|
324 |
+
"BLEU": evaluation_results["cjpe-explanation"]["BLEU"],
|
325 |
},
|
326 |
"BAIL": {"mF1": evaluation_results["bail"]["mF1"]},
|
327 |
"LSI": {"mF1": evaluation_results["lsi"]["mF1"]},
|