Skip to content

Commit 052ba5f

Browse files
update xor label
1 parent 3ba9625 commit 052ba5f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

supervised_class/perceptron.py

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def score(self, X, Y):
100100
print ""
101101
print "XOR results:"
102102
X, Y = get_simple_xor()
103+
Y[Y == 0] = -1
103104
model.fit(X, Y)
104105
print "XOR accuracy:", model.score(X, Y)
105106

0 commit comments

Comments
 (0)