Skip to content
Snippets Groups Projects
Commit 97bc8179 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[engine.evaluator] Improve log messages for clarity

parent 139af88c
No related branches found
No related tags found
1 merge request!12Streamlining
...@@ -309,16 +309,17 @@ def run( ...@@ -309,16 +309,17 @@ def run(
optimal_f1_threshold = avg_metrics["f1_score"].idxmax() optimal_f1_threshold = avg_metrics["f1_score"].idxmax()
logger.info( logger.info(
f"Highest (a posteriori) F1-score of {maxf1:.5f}, achieved at " f"Maximum F1-score of {maxf1:.5f}, achieved at "
f"threshold {optimal_f1_threshold:.2f}" f"threshold {optimal_f1_threshold:.2f} (chosen *a posteriori*)"
) )
if threshold is not None: if threshold is not None:
f1_apriori = avg_metrics["f1_score"][threshold]
f1_a_priori = avg_metrics["f1_score"][threshold]
logger.info( logger.info(
f"F1-score (a priori) is {f1_apriori:.5f}, at " f"F1-score of {f1_a_priori:.5f}, at threshold {threshold:.5f} "
f"threshold={threshold:.5f}" f"(chosen *a priori*)"
) )
if output_folder is not None: if output_folder is not None:
...@@ -436,6 +437,4 @@ def compare_annotators(baseline, other, output_folder, overlayed_folder=None): ...@@ -436,6 +437,4 @@ def compare_annotators(baseline, other, output_folder, overlayed_folder=None):
avg_metrics.to_csv(metrics_path) avg_metrics.to_csv(metrics_path)
maxf1 = avg_metrics["f1_score"].max() maxf1 = avg_metrics["f1_score"].max()
optimal_f1_threshold = avg_metrics["f1_score"].idxmax() logger.info(f"Maximum F1-score of {maxf1:.5f} (second annotator)")
logger.info(f"Highest F1-score of {maxf1:.5f} (second annotator)")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment