-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
Context
-
As of now, when we run
morphoclass evaluate, we generate a HTML report which includes various model performance metrics. -
A confusion matrix is also included in this HTML report. But this confusion matrix is a PNG image:
morphoclass/src/morphoclass/console/evaluate.py
Lines 108 to 125 in 8c60e05
# model report on all samples cm_path = img_dir / "confusion_matrix.png" plot_confusion_matrix( metrics["confusion_matrix"], cm_path, labels=training_log.labels_str ) report_html = f""" <div class="row"> <br/><hr/><br/> <div class='col-md-6'> <h5>Average performance scores:</h5> <pre>{metrics["classification_report"]}</pre> </div> <div class='col-md-6'> <img src='file:{relative_to_html(cm_path)}' width='80%'> </div> </div> """ report_html = textwrap.dedent(report_html).strip()
-
This is inconvenient, because we may need to access programmatically the values in these confusion matrices later on.
Actions
- Replace the PNG image with the confusion matrix by a HTML
<table>element.