Skip to content

Commit 73ec603

Browse files
committed
fix argmax in mc_confusion_matrix
1 parent bfa3266 commit 73ec603

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

bayesflow/diagnostics/plots/mc_confusion_matrix.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
from sklearn.metrics import confusion_matrix
99

10-
from keras import ops
11-
1210
from bayesflow.utils.plot_utils import make_figure
1311

1412

@@ -75,8 +73,8 @@ def mc_confusion_matrix(
7573
cmap = LinearSegmentedColormap.from_list("", ["white", "#132a70"])
7674

7775
# Flatten input
78-
true_models = ops.argmax(true_models, axis=1)
79-
pred_models = ops.argmax(pred_models, axis=1)
76+
true_models = np.argmax(true_models, axis=1)
77+
pred_models = np.argmax(pred_models, axis=1)
8078

8179
# Compute confusion matrix
8280
cm = confusion_matrix(true_models, pred_models, normalize=normalize)

0 commit comments

Comments
 (0)