Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94e63cd

Browse files
Chipe1norvig
authored andcommitted
changed mean boolean error (aimacode#325)
* changed mean boolean error * Update learning.py
1 parent b2458ca commit 94e63cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

learning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def manhattan_distance(predictions, targets):
3333

3434

3535
def mean_boolean_error(predictions, targets):
36-
return mean([(p != t) for p, t in zip(predictions, targets)])
36+
return mean(int(p != t) for p, t in zip(predictions, targets))
3737

3838
# ______________________________________________________________________________
3939

0 commit comments

Comments
 (0)