We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca02738 commit 3f5f856Copy full SHA for 3f5f856
learning.py
@@ -35,6 +35,9 @@ def manhattan_distance(predictions, targets):
35
def mean_boolean_error(predictions, targets):
36
return mean(int(p != t) for p, t in zip(predictions, targets))
37
38
+def hamming_distance(predictions, targets):
39
+ return sum(p != t for p, t in zip(predictions, targets))
40
+
41
# ______________________________________________________________________________
42
43
0 commit comments