Skip to content

Commit 89a1973

Browse files
Merge pull request #2235 from MedAymenF:bug-fix
PiperOrigin-RevId: 547622792
2 parents 9ecb223 + 42c6642 commit 89a1973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/en/guide/core/logistic_regression_core.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@
769769
" # Compute the confusion matrix and normalize it\n",
770770
" plt.figure(figsize=(10,10))\n",
771771
" confusion = sk_metrics.confusion_matrix(y.numpy(), y_classes.numpy())\n",
772-
" confusion_normalized = confusion / confusion.sum(axis=1)\n",
772+
" confusion_normalized = confusion / confusion.sum(axis=1, keepdims=True)\n",
773773
" axis_labels = range(2)\n",
774774
" ax = sns.heatmap(\n",
775775
" confusion_normalized, xticklabels=axis_labels, yticklabels=axis_labels,\n",

0 commit comments

Comments
 (0)