Implement guess method

This commit is contained in:
George Lacey 2017-02-10 12:12:44 +00:00
parent a950e3e99c
commit d1b8f731d4

View File

@ -27,6 +27,11 @@ class Perceptron(object):
print("Total = %f" % input)
if input > 0:
return True
return 1
else:
return False
return -1
def guess(self, p_desired):
prediction = float(self.activation())
return p_desired - prediction