From 4458f901e646d9f31b81175be72c46fdc26a9083 Mon Sep 17 00:00:00 2001 From: Matteo Date: Wed, 7 Jun 2023 17:03:10 +0200 Subject: [PATCH] Resolve #1269. Changed the return of the accuracy score --- learning4e.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learning4e.py b/learning4e.py index 12c0defa5..5669c453e 100644 --- a/learning4e.py +++ b/learning4e.py @@ -910,7 +910,7 @@ def weighted_replicate(seq, weights, n): def accuracy_score(y_pred, y_true): assert y_pred.shape == y_true.shape - return np.mean(np.equal(y_pred, y_true)) + return np.mean(y_pred == y_true) def r2_score(y_pred, y_true):