Create perceptron learning algorithm.R