Skip to content
Snippets Groups Projects
Commit 3c53ce92 authored by Franck Dary's avatar Franck Dary
Browse files

R2 is given with more digits in eval script

parent 586737ed
No related branches found
No related tags found
No related merge requests found
......@@ -760,12 +760,15 @@ def main() :
evaluation[metric][0].aligned_total or (evaluation[metric][0].correct if metric == "Words" else "")
))
else :
print("{:{}}|{:10.2f} |{:10.2f} |{:10.2f} |{}".format(
precision = ("{:10.2f}" if abs(evaluation[metric][0].precision) > 1.0 else "{:10.4f}").format(evaluation[metric][0].precision)
recall = ("{:10.2f}" if abs(evaluation[metric][0].recall) > 1.0 else "{:10.4f}").format(evaluation[metric][0].recall)
f1 = ("{:10.2f}" if abs(evaluation[metric][0].f1) > 1.0 else "{:10.4f}").format(evaluation[metric][0].f1)
print("{:{}}|{} |{} |{} |{}".format(
metric,
maxColNameSize,
evaluation[metric][0].precision,
evaluation[metric][0].recall,
evaluation[metric][0].f1,
precision,
recall,
f1,
"{:10.2f}".format(evaluation[metric][0].aligned_accuracy) if evaluation[metric][0].aligned_accuracy is not None else ""
))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment