Perceptron helper methods