コード例 #1
0
 def predict(self, x):
     """Predict output on x."""
     return classify(np.dot(np.transpose(self.weights), x))
コード例 #2
0
 def response(self, x):
     """Compute perceptron response."""
     return classify(np.dot(self.weights, x))