Skip to content

Commit

Permalink
feat: Round values in graphic of the confusion matrix
Browse files Browse the repository at this point in the history
TASK: IL-347
  • Loading branch information
FlorianSchepersAA committed Apr 9, 2024
1 parent 49263da commit 84d9c10
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/examples/issue_classification_user_journey.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
"outputs": [],
"source": [
"### Helper methods ###\n",
"\n",
"\n",
"def display_histograms(\n",
" expected_labels_histogram: dict[str, int],\n",
" predicted_labels_histogram: dict[str, int],\n",
Expand Down Expand Up @@ -95,7 +93,14 @@
"\n",
" for i in range(len(expected_labels)):\n",
" for j in range(len(predicted_labels)):\n",
" ax.text(j, i, cross_table_values[i, j], ha=\"center\", va=\"center\", color=\"w\")\n",
" ax.text(\n",
" j,\n",
" i,\n",
" round(cross_table_values[i, j]),\n",
" ha=\"center\",\n",
" va=\"center\",\n",
" color=\"w\",\n",
" )\n",
"\n",
" ax.set_title(\"Confusion Matrix of Expected vs Predicted Labels\")\n",
" ax.set_xlabel(\"Predicted Labels\")\n",
Expand Down

0 comments on commit 84d9c10

Please sign in to comment.