def predict(self, x): """Predict output on x.""" return classify(np.dot(np.transpose(self.weights), x))
def response(self, x): """Compute perceptron response.""" return classify(np.dot(self.weights, x))