Skip to content

Commit

Permalink
Resolve aimacode#1269. Changed the return of the accuracy score
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo committed Jun 7, 2023
1 parent 61d695b commit 4458f90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion learning4e.py
Expand Up @@ -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):
Expand Down

0 comments on commit 4458f90

Please sign in to comment.