def get_score_table(self):
"""
Return iteration performance on 'dev' part formatted as an ASCII table (prettytable object)
:return: prettytable object
"""
x = PrettyTable()
best_ite = self.get_best_iteration()
x.field_names = ["Iteration", "Dev Score"]
for i, (iter_nb, payload) in enumerate(sorted(self.iterations_log.items()), start=1):
if best_ite == i:
current_iter_nb = "**{:03d}**".format(iter_nb)
else:
current_iter_nb = "{:03d}".format(iter_nb)
current_score = "{:.5f}".format(payload["dev_score"])
x.add_row([current_iter_nb, current_score])
return x
评论列表
文章目录